Skip to content

Node.js based forum software built for the modern web

perf: no need to count on every call

Barış Soner Uşaklı130815c725c8
diff --git a/src/messaging/rooms.js b/src/messaging/rooms.js
index 14d9baf924..a6cf2c6cb8 100644
--- a/src/messaging/rooms.js
+++ b/src/messaging/rooms.js
@@ -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) {