acceptGroupApplication method

  1. @override
Future<V2TimCallback> acceptGroupApplication({
  1. required String groupID,
  2. required String fromUser,
  3. required String toUser,
  4. required int type,
  5. required int addTime,
  6. String? reason,
})
override

Implementation

@override
Future<V2TimCallback> acceptGroupApplication(
    {required String groupID,
    required String fromUser,
    required String toUser,
    required int type,
    required int addTime,
    String? reason}) async {
  final result = await TencentImSDKPlugin.v2TIMManager
      .getGroupManager()
      .acceptGroupApplication(
        groupID: groupID,
        fromUser: fromUser,
        toUser: toUser,
        addTime: addTime,
        type: GroupApplicationTypeEnum.values[type],
        reason: reason ?? "",
      );
  if (result.code != 0) {
    _coreService.callOnCallback(TIMCallback(
        type: TIMCallbackType.API_ERROR,
        errorMsg: result.desc,
        errorCode: result.code));
  }
  return result;
}