Message Reaction
Reaction Description
Name | Data Type | Description | Attributes |
|
| ID of a document | |
|
| Type of document | |
|
| Name of the reaction | ' |
|
| ID of the reaction | |
|
| ID of the reactor | |
|
| Display name of the reactor | |
|
| The date/time when a reaction is created |
Reaction Query
To query for a list of all reactions on the specific message in a channel, right now to get the list of reactions is controlled by AmityReactionRepository
. We can observe in the same way as observing message. The only difference is sending postId
as the parameter. The operation will return an instance AmityCollection
of AmityReaction
that contains reaction name, message id, reactor id and reactor display name of the user and the reaction used.
This method will return a LiveObject of all the reactions of a specific message in the specified channel. You can observe the LiveObject in order to update your view whenever you receive a new reaction on that message.
Add Reaction
For adding a new reaction, we can use AmityReactionRepository
to perform its operation. Initialize the reactor with the client, don't forget to specify the reaction name as well.
Remove Reaction
For removing a new reaction, we can use AmityReactionRepository
to perform its operation. Initialize the reactor with the client and specify the reaction name.
Last updated