From 6ceecd4f9b1bfae29bf33f250830df5e2eda504e Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 20 Dec 2024 15:12:36 +0100 Subject: [PATCH] fix(notifications): Notifier::prepare() threw \InvalidArgumentException which is deprecated Signed-off-by: Joas Schilling --- lib/Notification/Notifier.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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\L10N\IFactory; 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 @@ class Notifier implements INotifier { 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();