WebWhatsapp-Wrapper
WebWhatsapp-Wrapper copied to clipboard
MULTIDEVICE send to UNKNOWN numbers
It seems new whatsapp multidevice needs a special method to send to unknown numbers. If anybody has a solution please share.
// 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');