setFriendApplicationRead static method

Future<V2TimCallback> setFriendApplicationRead()

Implementation

static Future<V2TimCallback> setFriendApplicationRead() async {
  String userData = Tools.generateUserData();
  Pointer<Uint8> user_data = Tools.string2PointerInt8(userData);

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