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 = _callRepository[chatId];

  if (call != null) {
    final ChatCallDeviceId? deviceId = call.value.deviceId;
    if (deviceId != null) {
      await _callRepository.transformDialogCallIntoGroupCall(
        chatId,
        deviceId,
        additionalMemberIds,
        groupName,
      );
    }
  }
}