mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
perf: no need to count on every call
This commit is contained in:
@@ -285,8 +285,7 @@ module.exports = function (Messaging) {
|
||||
};
|
||||
|
||||
Messaging.isGroupChat = async function (roomId) {
|
||||
const count = await Messaging.getUserCountInRoom(roomId);
|
||||
return count > 2;
|
||||
return (await Messaging.getRoomData(roomId)).groupChat;
|
||||
};
|
||||
|
||||
async function updateUserCount(roomIds) {
|
||||
|
||||
Reference in New Issue
Block a user