[FIX] Use WhatsApp's new sendTextMsgToChat function for sending messages
This commit is contained in:
parent
5576812017
commit
bf0fe8496c
2 changed files with 2 additions and 1 deletions
|
|
@ -138,7 +138,7 @@ class Client extends EventEmitter {
|
||||||
*/
|
*/
|
||||||
async sendMessage(chatId, message) {
|
async sendMessage(chatId, message) {
|
||||||
await this.pupPage.evaluate((chatId, message) => {
|
await this.pupPage.evaluate((chatId, message) => {
|
||||||
Store.Chat.get(chatId).sendMessage(message);
|
Store.SendMessage(Store.Chat.get(chatId), message);
|
||||||
}, chatId, message)
|
}, chatId, message)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -161,6 +161,7 @@ exports.ExposeStore = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
window.Store = window.mR.findModule("Conn")[0].default;
|
window.Store = window.mR.findModule("Conn")[0].default;
|
||||||
|
window.Store.SendMessage = window.mR.findModule("sendTextMsgToChat")[0].sendTextMsgToChat;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue