addMessageReaction method
Implementation
Future<V2TimCallback> addMessageReaction({
required String msgID,
required String reactionID,
}) async {
try {
final jsMessage = timeweb!.findMessage(msgID);
final res = await wrappedPromiseToFuture(timeweb!.addMessageReaction(jsMessage, reactionID));
if (res.code == 0) {
return V2TimCallback.fromJson({
"code": 0,
"desc": "ok",
"data": "",
});
} else {
return V2TimCallback.fromJson({
"code": res.code,
"desc": "error",
"data": "",
});
}
} catch (e) {
return CommonUtils.returnError(mapToJSObj({
"code": -1,
"message": e.toString(),
}));
}
}