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

Consider responseAsCaption to be false if it is undefined. #269

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 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 What should be the intended behaviour when we have not defined responseAsCaption but have file? -> Old behaviour was send only file -> New behaviour is send file and send response without caption (We are assuming responseAsCaption to be false if it is undefined)

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.