Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-07-16 12:49:41 +0300
committerJoas Schilling <coding@schilljs.com>2019-07-18 13:23:26 +0300
commitb2f41fc736b612426b70eb4b98fcd7146a943a98 (patch)
tree9d1d036b69da263f0dda98c3eb21a39b41358218 /lib/Notification
parenta3676594b1288f8de95b5bcbb7f5e0a479ef85cd (diff)
Adjust notifier to Nextcloud 17
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Notification')
-rw-r--r--lib/Notification/Notifier.php22
1 files changed, 21 insertions, 1 deletions
diff --git a/lib/Notification/Notifier.php b/lib/Notification/Notifier.php
index 58c252fac..ab49dcbe6 100644
--- a/lib/Notification/Notifier.php
+++ b/lib/Notification/Notifier.php
@@ -91,13 +91,33 @@ class Notifier implements INotifier {
}
/**
+ * Identifier of the notifier, only use [a-z0-9_]
+ *
+ * @return string
+ * @since 17.0.0
+ */
+ public function getID(): string {
+ return 'talk';
+ }
+
+ /**
+ * Human readable name describing the notifier
+ *
+ * @return string
+ * @since 17.0.0
+ */
+ public function getName(): string {
+ return $this->lFactory->get('spreed')->t('Talk');
+ }
+
+ /**
* @param INotification $notification
* @param string $languageCode The code of the language that should be used to prepare the notification
* @return INotification
* @throws \InvalidArgumentException When the notification was not prepared by a notifier
* @since 9.0.0
*/
- public function prepare(INotification $notification, $languageCode): INotification {
+ public function prepare(INotification $notification, string $languageCode): INotification {
if ($notification->getApp() !== 'spreed') {
throw new \InvalidArgumentException('Incorrect app');
}