fix: hotfix the 'openChatWindow' function (#3291)

Co-authored-by: Beny Filho <168232825+BenyFilho@users.noreply.github.com>
This commit is contained in:
alechkos 2024-09-25 20:33:04 +03:00 • committed by GitHub
commit b4c576123a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,9 +15,9 @@ class InterfaceController {
*/ */
async openChatWindow(chatId) { async openChatWindow(chatId) {
await this.pupPage.evaluate(async chatId => { await this.pupPage.evaluate(async chatId => {
let chatWid = window.Store.WidFactory.createWid(chatId); const chatWid = window.Store.WidFactory.createWid(chatId);
let chat = await window.Store.Chat.find(chatWid); const chat = window.Store.Chat.get(chat) || await window.Store.Chat.find(chatWid);
await window.Store.Cmd.openChatAt(chat); await window.Store.Cmd.openChatBottom(chat);
}, chatId); }, chatId);
} }