1
0

Capabilities.php 729 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCA\UserStatus;
  8. use OCP\Capabilities\ICapability;
  9. use OCP\IEmojiHelper;
  10. /**
  11. * Class Capabilities
  12. *
  13. * @package OCA\UserStatus
  14. */
  15. class Capabilities implements ICapability {
  16. public function __construct(
  17. private IEmojiHelper $emojiHelper,
  18. ) {
  19. }
  20. /**
  21. * @return array{user_status: array{enabled: bool, restore: bool, supports_emoji: bool}}
  22. */
  23. public function getCapabilities() {
  24. return [
  25. 'user_status' => [
  26. 'enabled' => true,
  27. 'restore' => true,
  28. 'supports_emoji' => $this->emojiHelper->doesPlatformSupportEmoji(),
  29. ],
  30. ];
  31. }
  32. }