Skip to content

Node.js based forum software built for the modern web

only rescind if nids exist

Barış Soner Uşaklıed421ca0c48d
diff --git a/src/notifications.js b/src/notifications.js
index 45696988ff..79f447f201 100644
--- a/src/notifications.js
+++ b/src/notifications.js
@@ -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),