mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
switch .filter to uniq
This commit is contained in:
@@ -160,9 +160,7 @@ Notifications.push = function (notification, uids, callback) {
|
||||
uids = [uids];
|
||||
}
|
||||
|
||||
uids = uids.filter(function (uid, index, array) {
|
||||
return parseInt(uid, 10) && array.indexOf(uid) === index;
|
||||
});
|
||||
uids = _.uniq(uids);
|
||||
|
||||
if (!uids.length) {
|
||||
return callback();
|
||||
|
||||
Reference in New Issue
Block a user