From 8332e3ac8a2de508a3494fb848ef56ed51b40b7f Mon Sep 17 00:00:00 2001 From: Pascal Precht Date: Tue, 2 Jun 2020 11:45:22 +0200 Subject: [PATCH] fix(chat): ensure chatType is set properly In ebd29d9ffd6d1981160c82a26d35be602b9231a3 we've introduced a regression where the channel list didn't expose the chat's chatType to the view, causing 1-on-1 chats identicons to break. This commit reintrodruces the chatType to the view. --- src/status/chat.nim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/status/chat.nim b/src/status/chat.nim index cbb85c7fe7..0a1e7ae8fe 100644 --- a/src/status/chat.nim +++ b/src/status/chat.nim @@ -81,8 +81,7 @@ proc join*(self: ChatModel, chatId: string, chatTypeInt: ChatType, isNewChat: bo proc load*(self: ChatModel) = let chatList = status_chat.loadChats() for chat in chatList: - # TODO: use correct type of chat instead of hardcoded 2 (assumes it's only public chats) - self.join(chat.id, ChatType.Public, false) + self.join(chat.id, chat.chatType, false) self.events.emit("chatsLoaded", ChatArgs(chats: chatList)) proc leave*(self: ChatModel, chatId: string) =