diff --git a/lib/Notification/Notifier.php b/lib/Notification/Notifier.php index fec28aebe..dbba06332 100644 --- a/lib/Notification/Notifier.php +++ b/lib/Notification/Notifier.php @@ -16,6 +16,7 @@ use OCP\Notification\AlreadyProcessedException; use OCP\Notification\INotification; use OCP\Notification\INotifier; +use OCP\Notification\UnknownNotificationException; class Notifier implements INotifier { /** @var IFactory */ @@ -77,7 +78,7 @@ public function getName(): string { public function prepare(INotification $notification, string $languageCode): INotification { $l = $this->l10nFactory->get('deck', $languageCode); if ($notification->getApp() !== 'deck') { - throw new \InvalidArgumentException(); + throw new UnknownNotificationException(); } $notification->setIcon($this->url->getAbsoluteURL($this->url->imagePath('deck', 'deck-dark.svg'))); $params = $notification->getSubjectParameters();