How to add a button to block a user

For safeguarding purposes, you may want to give your users the option to block another user. Currently TalkJS doesn’t have a built-in button to block a user. However, you can create a block button and add it to your chat UI yourself.

To create a new button, you could either use an action button or create a custom component to add to your theme in the theme editor. You can access the theme editor on the Themes page of your TalkJS dashboard, by selecting Edit for the theme that you would like to customize.

One part of the process of blocking a user would be to remove that user from group conversations and direct messages. To actually remove a user from a conversation, you can use the REST API to change their participation status.

For a guide on how to ban a user from a conversation using the REST API, as well as other chat moderation tools, see:


Do you have any questions about adding a block button? Get in touch.