Skip to main content
Block/Unblock lets users prevent specific users from sending them messages. When blocked, the message composer is hidden and replaced with an unblock prompt. Before starting, complete the Getting Started guide.

Components


Integration Steps

1. Block User

Call CometChat.blockUsers() with the target UID. On success, emit ccUserBlocked so all subscribed components react to the change.

2. Unblock User

Call CometChat.unblockUsers() with the target UID. On success, emit ccUserUnBlocked to restore the composer.

3. Composer Blocked State

When a user is blocked, replace the composer with an unblock prompt.

4. Block Option in User Info

Add a block/unblock option in the user info or details screen.

Feature Matrix


Next Steps

Users

Display and manage user lists.

Message Composer

Customize the message input component.

All Guides

Browse all feature and formatter guides.

Sample App

Full working sample application on GitHub.