fix: chat update

This commit is contained in:
Richard Ramos 2020-06-15 09:06:36 -04:00 committed by Iuri Matias
parent 0eb0ea03d4
commit 8c989c3b6c
1 changed files with 2 additions and 1 deletions

View File

@ -45,7 +45,8 @@ proc delete*(self: ChatModel) =
proc update*(self: ChatModel, chats: seq[Chat], messages: seq[Message]) =
for chat in chats:
self.channels[chat.id] = chat
if chat.isActive:
self.channels[chat.id] = chat
self.events.emit("chatUpdate", ChatUpdateArgs(messages: messages, chats: chats))
proc hasChannel*(self: ChatModel, chatId: string): bool =