mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46: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];
|
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) => {
|
Messaging.leaveRoom = async (uids, roomId) => {
|
||||||
const keys = uids
|
const keys = uids
|
||||||
.map(function (uid) {
|
.map(uid => 'uid:' + uid + ':chat:rooms')
|
||||||
return 'uid:' + uid + ':chat:rooms';
|
.concat(uids.map(uid => 'uid:' + uid + ':chat:rooms:unread'));
|
||||||
})
|
|
||||||
.concat(uids.map(function (uid) {
|
|
||||||
return 'uid:' + uid + ':chat:rooms:unread';
|
|
||||||
}));
|
|
||||||
|
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
db.sortedSetRemove('chat:room:' + roomId + ':uids', uids),
|
db.sortedSetRemove('chat:room:' + roomId + ':uids', uids),
|
||||||
|
|||||||
Reference in New Issue
Block a user