Merge pull request #6359 from jfsiebel/unread-chat-notification
Fix unread chat notification.
This commit is contained in:
commit
f375d4ab14
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user