acceptJoinApplication method

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

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 ChatError.

Implementation

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