diff --git a/src/messaging/rooms.js b/src/messaging/rooms.js index 4ad1c17d3c..51cfd793db 100644 --- a/src/messaging/rooms.js +++ b/src/messaging/rooms.js @@ -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 }]), ]); }