Merge pull request #12324 from ramonlsouza/issue-12287

fix: chat popup alerts in open private chat
This commit is contained in:
Anton Georgiev 2021-05-07 16:44:42 -04:00 committed by GitHub
commit b68aa39b86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,10 +82,10 @@ class ChatAlert extends PureComponent {
const unalertedMessagesByChatId = {};
activeChats
.filter(chat => chat.userId !== idChatOpen)
.filter(chat => chat.chatId !== idChatOpen)
.filter(chat => chat.unreadCounter > 0)
.forEach((chat) => {
const chatId = (chat.userId === 'public') ? publicChatId : chat.chatId;
const chatId = (chat.chatId === 'public') ? publicChatId : chat.chatId;
const thisChatUnreadMessages = UnreadMessages.getUnreadMessages(chatId, messages);
unalertedMessagesByChatId[chatId] = thisChatUnreadMessages.filter((msg) => {