You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

95 lines
2.3 KiB

  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * @copyright Copyright (c) 2017 Joas Schilling <coding@schilljs.com>
  5. *
  6. * @license GNU AGPL version 3 or any later version
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU Affero General Public License as
  10. * published by the Free Software Foundation, either version 3 of the
  11. * License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU Affero General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Affero General Public License
  19. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. namespace OCA\Talk\Activity;
  23. use OCP\Activity\ISetting;
  24. use OCP\IL10N;
  25. class Setting implements ISetting {
  26. /** @var IL10N */
  27. protected $l;
  28. public function __construct(IL10N $l) {
  29. $this->l = $l;
  30. }
  31. /**
  32. * @return string Lowercase a-z and underscore only identifier
  33. * @since 11.0.0
  34. */
  35. public function getIdentifier(): string {
  36. return 'spreed';
  37. }
  38. /**
  39. * @return string A translated string
  40. * @since 11.0.0
  41. */
  42. public function getName(): string {
  43. return $this->l->t('You were invited to a <strong>conversation</strong> or had a <strong>call</strong>');
  44. }
  45. /**
  46. * @return int whether the filter should be rather on the top or bottom of
  47. * the admin section. The filters are arranged in ascending order of the
  48. * priority values. It is required to return a value between 0 and 100.
  49. * @since 11.0.0
  50. */
  51. public function getPriority(): int {
  52. return 51;
  53. }
  54. /**
  55. * @return bool True when the option can be changed for the stream
  56. * @since 11.0.0
  57. */
  58. public function canChangeStream(): bool {
  59. return true;
  60. }
  61. /**
  62. * @return bool True when the option can be changed for the stream
  63. * @since 11.0.0
  64. */
  65. public function isDefaultEnabledStream(): bool {
  66. return true;
  67. }
  68. /**
  69. * @return bool True when the option can be changed for the mail
  70. * @since 11.0.0
  71. */
  72. public function canChangeMail(): bool {
  73. return true;
  74. }
  75. /**
  76. * @return bool True when the option can be changed for the stream
  77. * @since 11.0.0
  78. */
  79. public function isDefaultEnabledMail(): bool {
  80. return false;
  81. }
  82. }