getMessageReactions method
Implementation
Future<V2TimValueCallback<List<V2TimMessageReactionResult>>> getMessageReactions({
required List<String> msgIDList,
required int maxUserCountPerReaction,
List<String>? webMessageInstanceList,
}) async {
if (webMessageInstanceList == null) {
return CommonUtils.returnErrorForValueCb(mapToJSObj({
"code": -1,
"message": "webMessageInstanceList is null . please check",
}));
}
try {
final res = await wrappedPromiseToFuture(timeweb!.getMessageReactions(mapToJSObj({
"messageList": parseWebMessageInstanceList(webMessageInstanceList),
"maxUserCountPerReaction": maxUserCountPerReaction,
})));
// print();
var list = V2TimMessageReactionResultWeb.fromJsObjs(List<dynamic>.from(jsToMap(res.data)["resultList"] ?? [])).map((e) => e.toJson()).toList();
return CommonUtils.returnSuccess<List<V2TimMessageReactionResult>>(list);
} catch (e) {
return CommonUtils.returnErrorForValueCb(mapToJSObj({
"code": -1,
"message": e.toString(),
}));
}
}