Update chats-out.js

Correction to send messages with image.
This commit is contained in:
Odair Victoriano 2023-03-04 22:27:33 -03:00 committed by GitHub
parent 0bedc400c8
commit 4f398119e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,7 +77,7 @@ module.exports = function(RED) {
var whatsappImageBase64 = whatsappImage.split(',')[1] || whatsappImage;
try {
if (node.waClient.clientType === "waWebClient"){
numb = await webNubmerSeteing(node.number)
numb = await webNubmerSeteing(numb)
var myMessage = new MessageMedia('image/png', whatsappImageBase64, null, null);
node.waClient.sendMessage(numb, myMessage, {caption : whatsappCaption || "Image from Node-Red"});
}