Message actions

Apart from just sending messages, there are various other actions that you may want your users to be able to perform within the chat UI.

Configure message actions and permissions

You can configure which actions a user is able to take based on their role. For each action, you can choose on which messages users with this role can perform it:

  • None (users with this role can't perform this action)
  • Their own messages
  • All messages

You can also define custom actions for each role from the Chat UI page by giving them a name and a label. The label shows up in the actions menu. You can use the action's name to refer to this action within the JavaScript SDK. When the user selects a custom action, this triggers an event within the JavaScript SDK that you can listen for, and use to run whatever code you want in response.

If you're using the classic React SDK or classic JavaScript SDK, you can also create custom message actions. See the Add custom message actions guide for how to add custom message actions, and troubleshooting steps.