mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-16 02:36:16 +01:00
add new hook filter:unread.categories
This commit is contained in:
@@ -32,7 +32,11 @@ unreadController.get = function (req, res, next) {
|
||||
|
||||
async.parallel({
|
||||
watchedCategories: function (next) {
|
||||
helpers.getWatchedCategories(req.uid, cid, next);
|
||||
if (plugins.hasListeners('filter:unread.categories')) {
|
||||
plugins.fireHook('filter:unread.categories', { uid: req.uid, cid: cid }, next);
|
||||
} else {
|
||||
helpers.getWatchedCategories(req.uid, cid, next);
|
||||
}
|
||||
},
|
||||
settings: function (next) {
|
||||
user.getSettings(req.uid, next);
|
||||
|
||||
Reference in New Issue
Block a user