fix(@desktop/chat): start chat after contact request accepted

fixes #2902
This commit is contained in:
Anthony Laibe 2021-07-20 09:45:09 +02:00 committed by Iuri Matias
parent 6564bd8497
commit 5f8a6f33fa
1 changed files with 4 additions and 1 deletions

View File

@ -124,7 +124,10 @@ proc join*(self: ChatModel, chatId: string, chatType: ChatType, ensName: string
proc createOneToOneChat*(self: ChatModel, publicKey: string, ensName: string = "") =
if self.hasChannel(publicKey): return
if self.hasChannel(publicKey):
self.emitTopicAndJoin(self.channels[publicKey])
return
var chat = newChat(publicKey, ChatType.OneToOne)
if ensName != "":
chat.name = ensName