acceptFriendApplication method

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

Implementation

@override
Future<V2TimFriendOperationResult?> acceptFriendApplication({
  required FriendResponseTypeEnum responseType,
  required FriendApplicationTypeEnum type,
  required String userID,
}) async {
  final res = await TencentImSDKPlugin.v2TIMManager
      .getFriendshipManager()
      .acceptFriendApplication(
        responseType: responseType,
        type: type,
        userID: userID,
      );
  if (res.code == 0) {
    return res.data;
  } else {
    _coreService.callOnCallback(TIMCallback(
        type: TIMCallbackType.API_ERROR,
        errorMsg: res.desc,
        errorCode: res.code));
    return null;
  }
}