mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
a bit more integration for #6463
This commit is contained in:
@@ -254,6 +254,17 @@ function pushToUids(uids, notification, callback) {
|
||||
}
|
||||
|
||||
async.waterfall([
|
||||
function (next) {
|
||||
// Remove uid from recipients list if they have blocked the user triggering the notification
|
||||
async.filter(uids, function (uid, next) {
|
||||
User.blocks.is(notification.from, uid, function (err, blocked) {
|
||||
next(err, !blocked);
|
||||
});
|
||||
}, function (err, _uids) {
|
||||
uids = _uids;
|
||||
next(err);
|
||||
});
|
||||
},
|
||||
function (next) {
|
||||
plugins.fireHook('filter:notification.push', { notification: notification, uids: uids }, next);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user