acceptJoinApplication method

Future<void> acceptJoinApplication(
  1. String groupId,
  2. String username
)

~english Approves a group join application. Only the group owner can call this method.

Param groupId The group ID. Param username The applicant's username.

Returns None.

Throws Exception description, see EMError. ~end

~chinese 批准入群申请。 仅群主有权限调用。

Param groupId 所申请的群组 ID。 Param username 申请人用户名。

Return 无。

Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 EMError. ~end

Implementation

Future<void> acceptJoinApplication(
  String groupId,
  String username,
) async {
  try {
    Map req = {'groupId': groupId, 'userId': username};
    Map result = await Client.instance.groupManager
        .callNativeMethod(ChatMethodKeys.acceptJoinApplication, req);
    EMError.hasErrorFromResult(result);
  } catch (e) {
    rethrow;
  }
}