-
Notifications
You must be signed in to change notification settings - Fork 509
Adjust notifier to Nextcloud 17 #2003
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
b2f41fc
c3c735e
771bb4e
705847f
ebf7781
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Signed-off-by: Joas Schilling <[email protected]>
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -90,14 +90,34 @@ public function __construct(IFactory $lFactory, | |
| $this->definitions = $definitions; | ||
| } | ||
|
|
||
| /** | ||
| * Identifier of the notifier, only use [a-z0-9_] | ||
| * | ||
| * @return string | ||
| * @since 17.0.0 | ||
| */ | ||
| public function getID(): string { | ||
| return 'talk'; | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New method in 17, replacing the |
||
| } | ||
|
|
||
| /** | ||
| * Human readable name describing the notifier | ||
| * | ||
| * @return string | ||
| * @since 17.0.0 | ||
| */ | ||
| public function getName(): string { | ||
| return $this->lFactory->get('spreed')->t('Talk'); | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. New method in 17, replacing the |
||
| } | ||
|
|
||
| /** | ||
| * @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 { | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Type hint for |
||
| if ($notification->getApp() !== 'spreed') { | ||
| throw new \InvalidArgumentException('Incorrect app'); | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Register with the class name, instead of a closure