From 64e2cc48fcc101244bd136385222c0c77760144d Mon Sep 17 00:00:00 2001 From: tuyuribr <45042245+tuyuribr@users.noreply.github.com> Date: Mon, 31 May 2021 20:21:57 -0300 Subject: [PATCH] feat: openChatWindow can open new chats (#592) Open the chat window even if you never chatted with the chatId Co-authored-by: Pedro S. Lopez --- src/util/InterfaceController.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/util/InterfaceController.js b/src/util/InterfaceController.js index ef8cb7d..3c0200c 100644 --- a/src/util/InterfaceController.js +++ b/src/util/InterfaceController.js @@ -15,7 +15,8 @@ class InterfaceController { */ async openChatWindow(chatId) { await this.pupPage.evaluate(async chatId => { - let chat = await window.Store.Chat.get(chatId); + let chatWid = window.Store.WidFactory.createWid(chatId); + let chat = await window.Store.Chat.find(chatWid); await window.Store.Cmd.openChatAt(chat); }, chatId); } @@ -75,4 +76,4 @@ class InterfaceController { } -module.exports = InterfaceController; \ No newline at end of file +module.exports = InterfaceController;