vasani-arpit / WBOT

A simple Web based BOT for WhatsApp™ in NodeJS 😜. Working as of 📅 Feb 4th, 2024
Other
988 stars 313 forks source link

Media sending no longer working #327

Closed deanylev closed 2 years ago

deanylev commented 2 years ago

Describe the bug The sendImage function doesn't appear to be working anymore. When responding with a files array from my server, the images don't get sent anymore, and instead I get an error in my console (attached in the screenshots section).

To Reproduce Steps to reproduce the behavior:

  1. Call WAPI.sendImage with a base64 encoded image and chat ID.

Expected behavior The image should be sent into the chat.

Screenshots

image

App information (please complete the following information):

vasani-arpit commented 2 years ago

This is currently being fixed in #325

Consir-Informatica commented 2 years ago

Hi deanylev .... find the WAPI.sendImage function and change ".models[0]" to "._models[0]" from the WAPI.js file. For me it worked.

deanylev commented 2 years ago

@Consir-Informatica cheers, that's seems to have worked.

StrikOne commented 2 years ago

How do I reply to a message with more than one image? for example 2 images in 1 answer

vasani-arpit commented 2 years ago

If you are using webhook then it is just an array you can put as many message objects you like in the response.

vasani-arpit commented 2 years ago

Should be fixed in v0.29.0 https://github.com/vasani-arpit/WBOT/releases

Please check and let me know.