acceptInvitation method

Future<ChatGroup> acceptInvitation(
  1. String groupId,
  2. String inviter

Accepts a group invitation.

Param groupId The group ID.

Param inviter The user who initiates the invitation.

Return The group instance which the user has accepted the invitation to join.

Throws A description of the exception. See ChatError.


Future<ChatGroup> acceptInvitation(
  String groupId,
  String inviter,
) async {
  Map req = {'groupId': groupId, 'inviter': inviter};
  Map result = await _channel.invokeMethod(
      ChatMethodKeys.acceptInvitationFromGroup, req);
  try {
    return ChatGroup.fromJson(
  } on ChatError catch (e) {
    throw e;