diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2021-12-20 17:58:54 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2022-02-04 08:53:18 +0100 |
commit | 2c356d085236ba17367f25998953b61368078fcd (patch) | |
tree | 5dea9ee6937915d06a2e1989009efdda7adb2656 /lib/private/Talk/ConversationOptions.php | |
parent | eb1927040f8e059bd0a291f4a9db41b2ef48acf2 (diff) | |
download | nextcloud-server-2c356d085236ba17367f25998953b61368078fcd.tar.gz nextcloud-server-2c356d085236ba17367f25998953b61368078fcd.zip |
Add a Talk API for OCP
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/Talk/ConversationOptions.php')
-rw-r--r-- | lib/private/Talk/ConversationOptions.php | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/lib/private/Talk/ConversationOptions.php b/lib/private/Talk/ConversationOptions.php new file mode 100644 index 00000000000..f86c8d037d3 --- /dev/null +++ b/lib/private/Talk/ConversationOptions.php @@ -0,0 +1,49 @@ +<?php + +declare(strict_types=1); + +/* + * @copyright 2022 Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @author 2022 Christoph Wurst <christoph@winzerhof-wurst.at> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +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; + } +} |