diff --git a/bigbluebutton-html5/imports/ui/services/unread-messages/index.js b/bigbluebutton-html5/imports/ui/services/unread-messages/index.js index 54bf967721cd737c00e6f96c83e4b11c3557a779..70d5c1d05267ed013a1f4b22e912d8ddbd24ff2c 100755 --- a/bigbluebutton-html5/imports/ui/services/unread-messages/index.js +++ b/bigbluebutton-html5/imports/ui/services/unread-messages/index.js @@ -40,10 +40,12 @@ class UnreadMessagesTracker { sender: { $ne: Auth.userID }, }; if (chatID === PUBLIC_GROUP_CHAT_ID) { - filter.chatId = { $not: { $ne: chatID } }; + filter.chatId = { $eq: chatID }; } else { const privateChat = GroupChat.findOne({ users: { $all: [chatID, Auth.userID] } }); + filter.chatId = { $ne: PUBLIC_GROUP_CHAT_ID }; + if (privateChat) { filter.chatId = privateChat.chatId; }