From 61deb962e374cb38ce279f7e86fc59848ed9fed6 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 27 Jul 2017 22:17:56 -0400 Subject: [PATCH] adding notifications.get hook --- src/controllers/accounts/notifications.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/controllers/accounts/notifications.js b/src/controllers/accounts/notifications.js index d398003782..3ec4708e7a 100644 --- a/src/controllers/accounts/notifications.js +++ b/src/controllers/accounts/notifications.js @@ -75,6 +75,17 @@ notificationsController.get = function (req, res, next) { user.notifications.getNotifications(nids, req.uid, next); }, + function (notifications, next) { + plugins.fireHook('filter:notifications.get', { + notifications: notifications, + }, function (err, data) { + if (err) { + return next(err); + } + + next(null, data.notifications); + }); + }, function (notifications) { res.render('notifications', { notifications: notifications,