For AI agents: Find a documentation index at https://talkjs.com/llms.txt (full content at https://talkjs.com/llms-full.txt). Get a markdown version of any page by appending .md to its URL path.

Message actions

Control which actions users can perform on a message.

View as Markdown

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

Custom message actions

  • UI Components: Override the MessageActionMenu theme component to add your own menu items and callbacks. See Custom message actions for a forwarding example.
  • Classic JavaScript / React SDK: Define custom actions for each role from the TalkJS Dashboard's Chat UI page by giving them a name and a label. Selecting the action triggers an event in the Classic SDK that you can listen for in your code. See Add custom message actions.