aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Talk/ConversationOptions.php
blob: f167fa6d164c7f8937e50800fecb2afe50abdb96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?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 bool $isPublic;

	private function __construct(bool $isPublic) {
		$this->isPublic = $isPublic;
	}

	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;
	}
}