Update chats-out.js
Correction to send messages with image.
This commit is contained in:
parent
0bedc400c8
commit
4f398119e9
@ -77,7 +77,7 @@ module.exports = function(RED) {
|
|||||||
var whatsappImageBase64 = whatsappImage.split(',')[1] || whatsappImage;
|
var whatsappImageBase64 = whatsappImage.split(',')[1] || whatsappImage;
|
||||||
try {
|
try {
|
||||||
if (node.waClient.clientType === "waWebClient"){
|
if (node.waClient.clientType === "waWebClient"){
|
||||||
numb = await webNubmerSeteing(node.number)
|
numb = await webNubmerSeteing(numb)
|
||||||
var myMessage = new MessageMedia('image/png', whatsappImageBase64, null, null);
|
var myMessage = new MessageMedia('image/png', whatsappImageBase64, null, null);
|
||||||
node.waClient.sendMessage(numb, myMessage, {caption : whatsappCaption || "Image from Node-Red"});
|
node.waClient.sendMessage(numb, myMessage, {caption : whatsappCaption || "Image from Node-Red"});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user