mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
refactor: use arrow func
This commit is contained in:
@@ -69,8 +69,6 @@ module.exports = function (Messaging) {
|
||||
});
|
||||
|
||||
delete Messaging.notifyQueue[fromuid + ':' + roomId];
|
||||
if (notification) {
|
||||
notifications.push(notification, uids);
|
||||
}
|
||||
notifications.push(notification, uids);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -114,12 +114,8 @@ module.exports = function (Messaging) {
|
||||
|
||||
Messaging.leaveRoom = async (uids, roomId) => {
|
||||
const keys = uids
|
||||
.map(function (uid) {
|
||||
return 'uid:' + uid + ':chat:rooms';
|
||||
})
|
||||
.concat(uids.map(function (uid) {
|
||||
return 'uid:' + uid + ':chat:rooms:unread';
|
||||
}));
|
||||
.map(uid => 'uid:' + uid + ':chat:rooms')
|
||||
.concat(uids.map(uid => 'uid:' + uid + ':chat:rooms:unread'));
|
||||
|
||||
await Promise.all([
|
||||
db.sortedSetRemove('chat:room:' + roomId + ':uids', uids),
|
||||
|
||||
Reference in New Issue
Block a user