fix: #7261, banned users still get digests

This commit is contained in:
Julian Lam
2019-02-08 16:26:38 -05:00
parent 91a7b9070a
commit aca0556052

View File

@@ -77,6 +77,13 @@ Digest.getSubscribers = function (interval, callback) {
next(err, subs); next(err, subs);
}); });
}, },
function (subscribers, next) {
async.filter(subscribers, function (uid, next) {
user.isBanned(uid, function (err, banned) {
next(err, !banned);
});
}, next);
},
function (subscribers, next) { function (subscribers, next) {
plugins.fireHook('filter:digest.subscribers', { plugins.fireHook('filter:digest.subscribers', {
interval: interval, interval: interval,