Message Reaction
Interactions are more fun when you can express yourself! Let users react using emojis, stickers, or thumbs up to messages.
Last updated
Interactions are more fun when you can express yourself! Let users react using emojis, stickers, or thumbs up to messages.
Last updated
The Social Plus SDK product also provides functionality for adding and removing reactions to messages. Users can add any number of reactions to a particular message, allowing them to engage with the content in a more expressive and nuanced way. Additionally, users can also remove reactions that they have added to a message, providing greater control and flexibility over their engagement with the content.
The addReaction
function allows users to add a reaction to a message. The function takes the name of the reaction as a parameter, with a maximum length of 100 characters. The reaction name is case-sensitive, which means that "like" and "Like" are treated as two different reactions.
You can add reactions to a given reference through the addReaction
method.
referenceId
- ID of the message.
reactionName
- the name of the reaction that you will remove. Reaction name is case sensitive, i.e. "like" & "Like" are two different reactions.
Similarly, the removeReaction
function allows users to remove a previously added reaction from a reference. This provides users with greater control over their engagement with the content and allows them to change their minds or update their reactions to the message over time.
You can remove a reaction from a reference by calling removeReaction
.
reactionName
- the name of the reaction that you will remove. Reaction name is case sensitive, i.e. "like" & "Like" are two different reactions.
referenceId
- ID of the message.
To further facilitate the management of reactions in your app, the Chat SDK product includes a getReactions
method that allows you to retrieve information about a specific reaction or all reactions on a message.
Using this method, you can fetch detailed information about a particular reaction, including the user who made the reaction, the timestamp of the reaction, and any additional metadata associated with the reaction. This can be useful for analyzing the sentiment of the community and gaining insights into the types of content that are resonating with your users.
To query getReactions
you'll need to simply provide referenceType
and referenceId
to query specific types of reactions. For further information regarding reaction reference types, please see - Reaction Reference Type.