WebWhatsapp-Wrapper icon indicating copy to clipboard operation
WebWhatsapp-Wrapper copied to clipboard

SendMessage don't Work. File: WAPI.js on new number

Open mraakashjoshi opened this issue 3 years ago • 9 comments

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.

mraakashjoshi avatar Sep 03 '21 11:09 mraakashjoshi

Same issue here

maticzd avatar Sep 03 '21 19:09 maticzd

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 avatar Sep 03 '21 19:09 andlb

@andlb Thanks! It works for me

santirlopez1124 avatar Sep 03 '21 22:09 santirlopez1124

Yes, thanks!

This https://github.com/mukulhase/WebWhatsapp-Wrapper/issues/1068#issuecomment-910232992 works too.

maticzd avatar Sep 03 '21 22:09 maticzd

Tks. It works for me too.

pablodosreis avatar Sep 03 '21 23:09 pablodosreis

It is not working for me, can someone share whole WAPI.Js here please.

Thanks in advance.

bhatpatil avatar Sep 04 '21 08:09 bhatpatil

Not working for Business whatsapp account..

mraakashjoshi avatar Sep 08 '21 04:09 mraakashjoshi

thanks.

tetradox avatar Sep 16 '21 18:09 tetradox

// 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');

duzaq avatar Jan 30 '22 16:01 duzaq