mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-18 03:29:14 +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) {
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user