vasani-arpit / WBOT

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

Refractor #290

Closed nikhilmaske-2001 closed 2 years ago

nikhilmaske-2001 commented 2 years ago

Bumped version: 0.25.0

The older behavior of the codebase doesn't send the file response when we have file and have not defined responseAsCaption. The good behavior is to send the response in all condition (even when responseAsCaption is undefined)

This PR fixes the above issue as well as refractor some code which is also a TODO (as mentioned in the codebase)

Testing plan: Tested it with all 3 combinations of responseAsCaption (i.e true, false, undefined) (Also tested with other combinations like only response for exact or partialMatch or noMatch)

nikhilmaske-2001 commented 2 years ago

@vasani-arpit This PR is a duplicate of PR #269 which was closed by stale bot and I am not able to reopen it. This PR is ready for review, please take a look at it.