1
0

ConversationOptions.php 651 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OC\Talk;
  8. use OCP\Talk\IConversationOptions;
  9. class ConversationOptions implements IConversationOptions {
  10. private bool $isPublic;
  11. private function __construct(bool $isPublic) {
  12. $this->isPublic = $isPublic;
  13. }
  14. public static function default(): self {
  15. return new self(false);
  16. }
  17. public function setPublic(bool $isPublic = true): IConversationOptions {
  18. $this->isPublic = $isPublic;
  19. return $this;
  20. }
  21. public function isPublic(): bool {
  22. return $this->isPublic;
  23. }
  24. }