Interactions are more fun when you can express yourself! Let users react using emojis, stickers, or thumbs up to messages.
The Social SDK product also provides functionality for adding and removing reactions on 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.
referenecId
- ID of the message.
reactionName
- name of the reaction that you will remove. Reaction name is case sensitive, i.e "like" & "Like" are two different reactions.
Version 6
Beta
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 mind or update their reaction to the message over time.
You can remove a reaction from a reference by calling removeReaction
.
reactionName
- name of the reaction that you will remove. Reaction name is case sensitive, i.e "like" & "Like" are two different reactions.
referenecId
- ID of the message.
Version 6
Beta (v0.0.1)
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 type of reactions. For further information regarding reaction reference types, please see - #create-comment.
Supported ✅ (please wait while we prepare a real example!)
Version 6 and Beta(v0.0.1)