diff options
author | Joas Schilling <coding@schilljs.com> | 2024-06-25 11:20:48 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2024-06-25 11:56:24 +0200 |
commit | 8130968a352bcf66606a076598fa4a58a291bc6d (patch) | |
tree | ed7d9c5bfc0d7e1b3c63348f0416d96cb51fb6ef /lib/private/Authentication | |
parent | 9496ce6c7a35f5a6d151b78d78a45b1c900b3b2a (diff) | |
download | nextcloud-server-8130968a352bcf66606a076598fa4a58a291bc6d.tar.gz nextcloud-server-8130968a352bcf66606a076598fa4a58a291bc6d.zip |
feat(notifications): Migrate server INotifiers to new exceptions
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Authentication')
-rw-r--r-- | lib/private/Authentication/Notifications/Notifier.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/Authentication/Notifications/Notifier.php b/lib/private/Authentication/Notifications/Notifier.php index 3b6c9b3e610..a81e385d8b1 100644 --- a/lib/private/Authentication/Notifications/Notifier.php +++ b/lib/private/Authentication/Notifications/Notifier.php @@ -8,10 +8,10 @@ declare(strict_types=1); */ namespace OC\Authentication\Notifications; -use InvalidArgumentException; use OCP\L10N\IFactory as IL10nFactory; use OCP\Notification\INotification; use OCP\Notification\INotifier; +use OCP\Notification\UnknownNotificationException; class Notifier implements INotifier { /** @var IL10nFactory */ @@ -27,7 +27,7 @@ class Notifier implements INotifier { public function prepare(INotification $notification, string $languageCode): INotification { if ($notification->getApp() !== 'auth') { // Not my app => throw - throw new InvalidArgumentException(); + throw new UnknownNotificationException(); } // Read the language from the notification @@ -52,7 +52,7 @@ class Notifier implements INotifier { return $notification; default: // Unknown subject => Unknown notification => throw - throw new InvalidArgumentException(); + throw new UnknownNotificationException(); } } |