FIX: Maintain order when updating notifications (PR #13643)

A more complex algorithm was used to achieve consensus between server and client lists of notifications. This commit uses a different and more simple approach that ignores order, but updates read status of existing notifications and removes stale notifications.

GitHub

            const read = Object.fromEntries(data.recent);

Could this non-for(;;) version work?

            // remove stale notifications and update existing ones
            const newNotifications = oldNotifications.map((notification) => {
              if (read[notification.id] !== undefined) {
                notification.set("read", read[notification.id]);
                return notification;
              }
            }).filter(Boolean);

            stale.results.set("content", newNotifications);