removeMessageReaction method

Future<V2TimCallback> removeMessageReaction({
  1. required String msgID,
  2. required String reactionID,
})

Implementation

Future<V2TimCallback> removeMessageReaction({
  required String msgID,
  required String reactionID,
}) async {
  try {
    final jsMessage = timeweb!.findMessage(msgID);
    final res = await wrappedPromiseToFuture(timeweb!.removeMessageReaction(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(),
    }));
  }
}