getMessageReactions method
Implementation
Future<void> getMessageReactions({
List<String>? msgIDList,
List<String>? webMessageInstanceList,
}) async {
final reactionsRes = await TencentImSDKPlugin.v2TIMManager.getMessageManager().getMessageReactions(
msgIDList: msgIDList ?? [],
webMessageInstanceList: webMessageInstanceList,
maxUserCountPerReaction: 10,
);
final List<V2TimMessageReactionResult>? reactions = reactionsRes.data;
reactions?.forEach((e) {
if ((e.reactionList ?? []).isNotEmpty) {
_messageReactionMap[e.messageID] = e.reactionList ?? [];
} else {
_messageReactionMap.remove(e.messageID);
}
});
setMessageReactionMap(null, (reactions?.map((e) => e.messageID) ?? []).toList());
return;
}