fix: prettier bulk method usage

isekai-main
Barış Soner Uşaklı 3 years ago committed by Julian Lam
parent 42959df053
commit 3b0c42a591

@ -117,9 +117,9 @@ module.exports = function (Messaging) {
const userCounts = await db.sortedSetsCard(roomIds.map(roomId => `chat:room:${roomId}:uids`));
const groupChats = roomIds.filter((roomId, index) => userCounts[index] > 2);
const privateChats = roomIds.filter((roomId, index) => userCounts[index] <= 2);
await Promise.all([
db.setObjectBulk(groupChats.map(id => [`chat:room:${id}`, { groupChat: 1 }])),
db.setObjectBulk(privateChats.map(id => [`chat:room:${id}`, { groupChat: 0 }])),
await db.setObjectBulk([
...groupChats.map(id => [`chat:room:${id}`, { groupChat: 1 }]),
...privateChats.map(id => [`chat:room:${id}`, { groupChat: 0 }]),
]);
}

Loading…
Cancel
Save