refactor: use arrow func

v1.18.x
Baris Usakli 6 years ago
parent 2b1f840eb1
commit 27c27b497e

@ -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),

Loading…
Cancel
Save