declineJoinApplication method

Future<EMGroup> declineJoinApplication(
  1. String groupId,
  2. String username, [
  3. String reason = ''
])

拒绝公开群组申请,当群类型是EMGroupStyle.PublicJoinNeedApproval, 有人申请进群时,管理员和群主会收到申请,用该方法拒绝申请

Implementation

Future<EMGroup> declineJoinApplication(
  String groupId,
  String username, [
  String reason = '',
]) async {
  Map req = {'groupId': groupId, 'username': username, 'reason': reason};
  Map result =
      await _channel.invokeMethod(EMSDKMethod.declineJoinApplication, req);
  EMError.hasErrorFromResult(result);
  return EMGroup.fromJson(result[EMSDKMethod.declineJoinApplication]);
}