mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 19:21:04 +01:00
feat: cleanup, use bulk
This commit is contained in:
@@ -124,10 +124,8 @@ module.exports = function (Messaging) {
|
||||
if (!inRoom) {
|
||||
return next(new Error('[[error:cant-add-users-to-chat-room]]'));
|
||||
}
|
||||
var now = Date.now();
|
||||
var timestamps = uids.map(function () {
|
||||
return now;
|
||||
});
|
||||
const now = Date.now();
|
||||
const timestamps = uids.map(() => now);
|
||||
db.sortedSetAdd('chat:room:' + roomId + ':uids', timestamps, uids, next);
|
||||
},
|
||||
function (next) {
|
||||
|
||||
Reference in New Issue
Block a user