nextcloud/lib/private/Talk/ConversationOptions.php
Joas Schilling 3f52005674
feat(talk): Allow to create conversations that are meetings
Signed-off-by: Joas Schilling <coding@schilljs.com>
2026-04-07 13:00:29 +02:00

48 lines
1.1 KiB
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OC\Talk;
use OCP\Talk\IConversationOptions;
class ConversationOptions implements IConversationOptions {
private function __construct(
private bool $isPublic,
private ?\DateTimeInterface $meetingStartDate = null,
private ?\DateTimeInterface $meetingEndDate = null,
) {
}
public static function default(): self {
return new self(false);
}
public function setPublic(bool $isPublic = true): IConversationOptions {
$this->isPublic = $isPublic;
return $this;
}
public function isPublic(): bool {
return $this->isPublic;
}
public function setMeetingDate(\DateTimeInterface $meetingStartDate, \DateTimeInterface $meetingEndDate): IConversationOptions {
$this->meetingStartDate = $meetingStartDate;
$this->meetingEndDate = $meetingEndDate;
return $this;
}
public function getMeetingStartDate(): ?\DateTimeInterface {
return $this->meetingStartDate;
}
public function getMeetingEndDate(): ?\DateTimeInterface {
return $this->meetingEndDate;
}
}