Describe the bug
When using the Chatwoot API to send "Options" type interactive messages for a WhatsApp inbox, if the button text exceeds the WhatsApp Cloud API limit of 24 characters, Chatwoot still creates the message in the conversation without returning an error. The HTTP response suggests that the message was successfully created; however, the "successfully sent" icon is not displayed in the conversation, and the recipient does not receive the message. This behavior is misleading because it implies successful message delivery when, in fact, the message was never sent due to the exceeded character limit set by WhatsApp Cloud API.
This issue could lead to confusion for the support agents as they might believe the message was sent successfully when it was not. This validation should probably be dealt with within Chatwoot to maintain message delivery integrity and user expectations.
To Reproduce
Steps to reproduce the behavior:
- Set up a WhatsApp type inbox in Chatwoot.
- Use the Chatwoot API to send an interactive message with "Options" that include button texts exceeding 24 characters.
- Observe that the API response indicates the message was created successfully.
- Check the conversation in Chatwoot web app and notice the message appears there.
- Observe that the "successfully sent" icon is missing beside the created message.
- The client does not receive any message on their end.
Expected behavior
The expected behavior would be for the Chatwoot API to validate the length of the button text against WhatsApp Cloud API's character limit before attempting to send the message. If the button text exceeds the 20-character limit, the API should return an error, and the message should not be created in the conversation within Chatwoot since it violates the constraints of the WhatsApp Cloud API and will not be sent.
Environment
Docker
Cloud Provider
AWS
Platform
Browser
Operating system
No response
Browser and version
No response
Docker (if applicable)
No response
Additional context
I'm running the following image on a Docker Swarm setup: chatwoot/chatwoot:v3.2.0-ce
CW-2823
Describe the bug
When using the Chatwoot API to send "Options" type interactive messages for a WhatsApp inbox, if the button text exceeds the WhatsApp Cloud API limit of 24 characters, Chatwoot still creates the message in the conversation without returning an error. The HTTP response suggests that the message was successfully created; however, the "successfully sent" icon is not displayed in the conversation, and the recipient does not receive the message. This behavior is misleading because it implies successful message delivery when, in fact, the message was never sent due to the exceeded character limit set by WhatsApp Cloud API.
This issue could lead to confusion for the support agents as they might believe the message was sent successfully when it was not. This validation should probably be dealt with within Chatwoot to maintain message delivery integrity and user expectations.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The expected behavior would be for the Chatwoot API to validate the length of the button text against WhatsApp Cloud API's character limit before attempting to send the message. If the button text exceeds the 20-character limit, the API should return an error, and the message should not be created in the conversation within Chatwoot since it violates the constraints of the WhatsApp Cloud API and will not be sent.
Environment
Docker
Cloud Provider
AWS
Platform
Browser
Operating system
No response
Browser and version
No response
Docker (if applicable)
No response
Additional context
I'm running the following image on a Docker Swarm setup: chatwoot/chatwoot:v3.2.0-ce
CW-2823