markGroupMessageAsRead static method

Future<V2TimCallback> markGroupMessageAsRead({
  1. required String groupID,
})

Implementation

static Future<V2TimCallback> markGroupMessageAsRead({
  required String groupID,
}) async {
  String userData = Tools.generateUserData();
  Pointer<Uint8> user_data = Tools.string2PointerInt8(userData);
  Pointer<Uint8> conv_id = Tools.string2PointerInt8(groupID);

  int res = desktopSDK.D_TIMMsgReportReaded(conv_id, 2, Pointer<Uint8>.fromAddress(0), user_data);
  if (res != TIMResult.TIM_SUCC) {
    return V2TimCallback.fromJson({
      "code": res,
      "desc": "",
    });
  } else {
    Map<String, dynamic> revoke = await getAsyncData(apiKey: userData);
    return V2TimCallback.fromJson({
      "code": revoke["code"],
      "desc": revoke["desc"],
    });
  }
}