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 <pslamoros@hotmail.com>
This commit is contained in:
tuyuribr
2021-05-31 20:21:57 -03:00
committed by GitHub
parent 6c66ab2bef
commit 64e2cc48fc

View File

@@ -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;
module.exports = InterfaceController;