1
0

Capabilities.php 789 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. private IEmojiHelper $emojiHelper;
  17. public function __construct(IEmojiHelper $emojiHelper) {
  18. $this->emojiHelper = $emojiHelper;
  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. }