WebWhatsapp-Wrapper
WebWhatsapp-Wrapper copied to clipboard
SendMessage don't Work. File: WAPI.js on new number
When we are trying to send message on new number of which chat does not exist. then message is not sending. but when we are sending message for which chat already exist then message sending is working.
Same issue here
This solution fixed the issue for me:
{ id: 'FindChat', conditions: (module) => (module && module.findChat)?module : null}
then instead of Store.Chat.find use Store.FindChat.findChat
By @mouhammad-zd
@andlb Thanks! It works for me
Yes, thanks!
This https://github.com/mukulhase/WebWhatsapp-Wrapper/issues/1068#issuecomment-910232992 works too.
Tks. It works for me too.
It is not working for me, can someone share whole WAPI.Js here please.
Thanks in advance.
Not working for Business whatsapp account..
thanks.
// use this code window.WAPI.sendMessageToID2 = function (id, message, done) { try { // Create user var idx = new window.Store.UserConstructor(id, {intentionallyUsePrivateConstructor: true}); // Get chat var chat = window.Store.Chat.find(idx); // Send message chat._value.sendMessage(message); } catch (e) { return false;
}
if (done !== undefined) done(false);
return false;
}; //window.WAPI.sendMessageToID2 ('[email protected]','oi');