Message Reaction

Reaction Description

Name
Data Type
Description
Attributes
referenceId
String
ID of a document
referenceType
String
Type of document
reactionName
String
Name of the reaction
'like', 'love' , 'wow'
reactionId
String
ID of the reaction
userId
String
ID of the reactor
ID of a creator
userDisplayName
String
Display name of the reactor
createdAt
DateTime
The date/time when a reaction is created
The date/time when a reaction is created

Reaction Data

There are 3 Reaction related methods on AmityMessage:
1. getReactionCount() returns Int, the total reaction count on the message.
2. getMyReactions() returns List<String>, a collection of reactions that have been added by the active user.
3. getReactions() returns AmityReactionMap, an extension of Map<String, Int> of reaction name and its count.

Add/Remove Reaction

You can choose to add/remove a reaction to/from a message using the react() method on AmityMessage.

Reaction Query

To query for a list of all reactions on a message:
This method will return a Flowable<PagedList<AmityReaction>> of all reactions in the specified message.
Export as PDF
Copy link
Outline
Reaction Description
Reaction Data
Add/Remove Reaction
Reaction Query