This commit is contained in:
binwiederhier
2026-01-06 14:22:55 -05:00
parent f51e99dc80
commit 2856793eff
6 changed files with 74 additions and 10 deletions

View File

@@ -175,6 +175,7 @@ class SubscriptionManager {
}
// Collapse notification updates based on sids, keeping only the latest version
// Filters out notifications where the latest in the sequence is deleted
groupNotificationsBySID(notifications) {
const latestBySid = {};
notifications.forEach((notification) => {
@@ -184,7 +185,8 @@ class SubscriptionManager {
latestBySid[key] = notification;
}
});
return Object.values(latestBySid);
// Filter out notifications where the latest is deleted
return Object.values(latestBySid).filter((n) => !n.deleted);
}
/** Adds notification, or returns false if it already exists */