diff --git a/src/notifications.js b/src/notifications.js index 6d6c360304..faf4cd4b5c 100644 --- a/src/notifications.js +++ b/src/notifications.js @@ -129,6 +129,12 @@ Notifications.create = async function (data) { } const now = Date.now(); data.datetime = now; + const result = await plugins.hooks.fire('filter:notifications.create', { + data: data, + }); + if (!result.data) { + return; + } await Promise.all([ db.sortedSetAdd('notifications', now, data.nid), db.setObject(`notifications:${data.nid}`, data),