only rescind if nids exist

This commit is contained in:
Barış Soner Uşaklı
2026-02-23 21:28:36 -05:00
parent 1c0d10a616
commit ed421ca0c4

View File

@@ -373,7 +373,10 @@ Notifications.pushGroups = async function (notification, groupNames) {
Notifications.rescind = async function (nids) {
nids = Array.isArray(nids) ? nids : [nids];
nids = Notifications.filterExists(nids);
if (!nids.length) {
return;
}
await plugins.hooks.fire('static:notifications.rescind', { nids });
await Promise.all([
db.sortedSetRemove('notifications', nids),