Skip to main content
Enhance user engagement in your chat application with message reactions. Users can express their emotions using reactions to messages. This feature allows users to add or remove reactions, and to fetch all reactions on a message.

Add a Reaction

Users can add a reaction to a message by calling addReaction with the message ID and the reaction emoji.
You can react on Text, Media and Custom messages.

Remove a Reaction

Removing a reaction from a message can be done using the removeReaction method. Both addReaction() and removeReaction() return a BaseMessage object with the updated reactions.

Fetch Reactions for a Message

To get all reactions for a specific message, create a ReactionsRequest using ReactionsRequestBuilder.

Fetch Next Reactions

Fetch Reactions for Specific Emoji

Fetch Previous Reactions


Real-time Reaction Events

Keep the chat interactive with real-time updates for reactions.

Get Reactions List

To retrieve the list of reactions on a particular message. Returns an array of ReactionCount objects:

Check if Logged-in User Has Reacted


Update Message With Reaction Info

When you receive a real-time reaction event, use this method to update the message with the latest reaction information. This keeps your local message state in sync with the server.

Method Signature

Parameters

ReactionAction Enum Values

Usage Example - Reaction Added

Usage Example - Reaction Removed

Complete Real-Time Handling Example

Notes:
  • This is a synchronous method - no callbacks needed
  • Always use this method to keep local message state in sync
  • The returned message has updated reactions array
  • Works with both user and group messages
  • Handle both REACTION_ADDED and REACTION_REMOVED events

ReactionCount Object Properties


MessageReaction Object Properties


ReactionEvent Object Properties


Common Error Codes


Next Steps

Send Messages

Send text, media, and custom messages to users and groups

Receive Messages

Listen for incoming messages in real-time and fetch missed messages

Mentions

Mention specific users in messages

Threaded Messages

Organize conversations with message threads