transformDialogCallIntoGroupCall method

Future<void> transformDialogCallIntoGroupCall(
  1. ChatId chatId,
  2. List<UserId> additionalMemberIds, {
  3. ChatName? groupName,
})

Moves an ongoing ChatCall in a Chat-dialog to a newly created Chat-group, optionally adding new members.

Implementation

Future<void> transformDialogCallIntoGroupCall(
  ChatId chatId,
  List<UserId> additionalMemberIds, {
  ChatName? groupName,
}) async {
  Log.debug(
    'transformDialogCallIntoGroupCall($chatId, $additionalMemberIds, $groupName)',
    '$runtimeType',
  );

  final Rx<OngoingCall>? call = _callsRepo[chatId];
  if (call != null) {
    await _callsRepo.transformDialogCallIntoGroupCall(
      chatId,
      additionalMemberIds,
      groupName,
    );
  } else {
    throw const TransformDialogCallIntoGroupCallException(
      TransformDialogCallIntoGroupCallErrorCode.noCall,
    );
  }
}