mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
refactor: use loash when possible (#7230)
This commit is contained in:
committed by
Barış Soner Uşaklı
parent
a4ab13d323
commit
e1ca2d81f9
@@ -558,11 +558,9 @@ Notifications.merge = function (notifications, callback) {
|
||||
case 'notifications:user_posted_to':
|
||||
case 'notifications:user_flagged_post_in':
|
||||
case 'notifications:user_flagged_user':
|
||||
var usernames = set.map(function (notifObj) {
|
||||
var usernames = _.uniq(set.map(function (notifObj) {
|
||||
return notifObj && notifObj.user && notifObj.user.username;
|
||||
}).filter(function (username, idx, array) {
|
||||
return array.indexOf(username) === idx;
|
||||
});
|
||||
}));
|
||||
var numUsers = usernames.length;
|
||||
|
||||
var title = utils.decodeHTMLEntities(notifications[modifyIndex].topicTitle || '');
|
||||
|
||||
Reference in New Issue
Block a user