feat: add error handling to mark messages as seen logic

This commit is contained in:
Eric Mastro 2021-04-19 20:49:33 +10:00 committed by Iuri Matias
parent 35c63418e2
commit 86e69132c6
1 changed files with 5 additions and 1 deletions

View File

@ -546,7 +546,11 @@ QtObject:
proc markMessageAsSent*(self:ChatsView, chat: string, messageId: string) =
self.messageList[chat].markMessageAsSent(messageId)
if self.messageList.contains(chat):
self.messageList[chat].markMessageAsSent(messageId)
else:
error "Message could not be marked as sent", chat, messageId
proc getMessageList(self: ChatsView): QVariant {.slot.} =
self.upsertChannel(self.activeChannel.id)