mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-20 12:39:20 +00:00
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:
@@ -15,7 +15,8 @@ class InterfaceController {
|
|||||||
*/
|
*/
|
||||||
async openChatWindow(chatId) {
|
async openChatWindow(chatId) {
|
||||||
await this.pupPage.evaluate(async 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);
|
await window.Store.Cmd.openChatAt(chat);
|
||||||
}, chatId);
|
}, chatId);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user