-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Message Action template logic bugs #11994
Copy link
Copy link
Closed
Description
The render logic includes a number of conditions, that in my opinion are branching on the wrong attributes. Because all conditions are if and there's no else, multiple conditions could be true, leading to multiple buttons being rendered.
There's two main problems:
-
if
msg_in_chat_windowis false or undefined, no button is rendered. -
If an action object contained all of
image_url,url,msg_in_chat_window,text, you would get four buttons.
Obviously that's something the action sender should be mindful of, but the template should also help to avoid display errors.
In my usage, I was setting msg_in_chat_window as default true for all actions, to avoid the first issue, but then I would get two buttons if I also included a url.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels