From b4c576123a9362522d4e3995cf38cebb59f42cbb Mon Sep 17 00:00:00 2001 From: alechkos <93551621+alechkos@users.noreply.github.com> Date: Wed, 25 Sep 2024 20:33:04 +0300 Subject: [PATCH] fix: hotfix the 'openChatWindow' function (#3291) Co-authored-by: Beny Filho <168232825+BenyFilho@users.noreply.github.com> --- src/util/InterfaceController.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/InterfaceController.js b/src/util/InterfaceController.js index c016f85..cb18ce9 100644 --- a/src/util/InterfaceController.js +++ b/src/util/InterfaceController.js @@ -15,9 +15,9 @@ class InterfaceController { */ async openChatWindow(chatId) { await this.pupPage.evaluate(async chatId => { - let chatWid = window.Store.WidFactory.createWid(chatId); - let chat = await window.Store.Chat.find(chatWid); - await window.Store.Cmd.openChatAt(chat); + const chatWid = window.Store.WidFactory.createWid(chatId); + const chat = window.Store.Chat.get(chat) || await window.Store.Chat.find(chatWid); + await window.Store.Cmd.openChatBottom(chat); }, chatId); }