mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-18 03:29:14 +00:00
[FIX] Use WhatsApp's new sendTextMsgToChat function for sending messages
This commit is contained in:
@@ -138,7 +138,7 @@ class Client extends EventEmitter {
|
||||
*/
|
||||
async sendMessage(chatId, message) {
|
||||
await this.pupPage.evaluate((chatId, message) => {
|
||||
Store.Chat.get(chatId).sendMessage(message);
|
||||
Store.SendMessage(Store.Chat.get(chatId), message);
|
||||
}, chatId, message)
|
||||
}
|
||||
|
||||
|
||||
@@ -161,6 +161,7 @@ exports.ExposeStore = () => {
|
||||
}
|
||||
|
||||
window.Store = window.mR.findModule("Conn")[0].default;
|
||||
window.Store.SendMessage = window.mR.findModule("sendTextMsgToChat")[0].sendTextMsgToChat;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user