From 0a8674c5cd2105cb22a85cec40637b7882230762 Mon Sep 17 00:00:00 2001 From: Anthony Laibe Date: Wed, 10 Nov 2021 20:47:41 +0100 Subject: [PATCH] fix: create one to one chat (#98) Even if the chat exists, we need to update it and mark it as active in case it already exists and is not active --- status/chat.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/status/chat.nim b/status/chat.nim index c9ce753..cf77af5 100644 --- a/status/chat.nim +++ b/status/chat.nim @@ -210,7 +210,9 @@ proc join*(self: ChatModel, chatId: string, chatType: ChatType, ensName: string self.emitTopicAndJoin(chat) proc createOneToOneChat*(self: ChatModel, publicKey: string, ensName: string = "") = - if self.hasChannel(publicKey): + if self.hasChannel(publicKey): + # We want to show the chat to the user and for that we activate the chat + status_chat.saveChat(publicKey, ChatType.OneToOne, color=self.channels[publicKey].color, ensName=ensName) self.emitTopicAndJoin(self.channels[publicKey]) return