acceptFriendApplication method

  1. @override
Future<V2TimValueCallback<V2TimFriendOperationResult>> acceptFriendApplication({
  1. required int responseType,
  2. required int type,
  3. required String userID,
})
override

同意好友申请

参数

application	好友申请信息,getFriendApplicationList 成功后会返回
responseType	建立单向/双向好友关系
V2TIMFriendApplication.V2TIM_FRIEND_ACCEPT_AGREE:同意添加单向好友
V2TIMFriendApplication.V2TIM_FRIEND_ACCEPT_AGREE_AND_ADD:同意并添加为双向好友

Implementation

@override
Future<V2TimValueCallback<V2TimFriendOperationResult>> acceptFriendApplication({
  required int responseType,
  required int type,
  required String userID,
}) async {
  Map<String, dynamic> param = {
    "responseType": responseType,
    "type": type,
    "userID": userID,
  };
  var resp = V2TimValueCallback<V2TimFriendOperationResult>.fromJson(
    formatJson(
      await _channel.invokeMethod(
        "acceptFriendApplication",
        buildFriendManagerParam(
          param,
        ),
      ),
    ),
  );
  log("acceptFriendApplication", param, resp.toLogString());
  return resp;
}