Skip to main content

The SDK provides two APIs for retrieving message reactions: one retrieves the latest data from the backend, and the other retrieves cached message reactions locally.

Locally cached data may not be the latest version, but it can be used to render the UI immediately and improve the user experience.

API Definition

/**
* get message reactions in batches (all messages must belong to the same conversation)
* @param messageIdList message ID list
* @param conversation conversation containing the message
* @param callback result callback
*/
void getMessagesReaction(List<String> messageIdList,
Conversation conversation,
IMessageReactionListCallback callback);

/**
* get cached message reactions (cached data may not be the latest version; use it to render the UI immediately for a better user experience)
* @param messageIdList message ID list
* @return message-reaction list
*/
List<MessageReaction> getCachedMessagesReaction(List<String> messageIdList);