Fixed chatRoom.markAsRead when called from ChatMessageReceived callback

This commit is contained in:
Sylvain Berfini 2018-02-01 14:06:40 +01:00
parent 6a4eb317f4
commit e0114d64f5

View file

@ -418,9 +418,6 @@ shared_ptr<ChatMessage> ChatRoom::findChatMessage (const string &messageId, Chat
void ChatRoom::markAsRead () {
L_D();
if (getUnreadChatMessageCount() == 0)
return;
CorePrivate *dCore = getCore()->getPrivate();
for (auto &chatMessage : dCore->mainDb->getUnreadChatMessages(d->chatRoomId))
chatMessage->sendDisplayNotification();