Skip to content

Commit 989db86

Browse files
authored
Merge pull request #6623 from nextcloud/bugfix/noid/notification-handling
fix(notifications): Notifier::prepare() threw \InvalidArgumentExcepti…
2 parents 61019d5 + 6ceecd4 commit 989db86

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/Notification/Notifier.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use OCP\Notification\AlreadyProcessedException;
1717
use OCP\Notification\INotification;
1818
use OCP\Notification\INotifier;
19+
use OCP\Notification\UnknownNotificationException;
1920

2021
class Notifier implements INotifier {
2122
/** @var IFactory */
@@ -77,7 +78,7 @@ public function getName(): string {
7778
public function prepare(INotification $notification, string $languageCode): INotification {
7879
$l = $this->l10nFactory->get('deck', $languageCode);
7980
if ($notification->getApp() !== 'deck') {
80-
throw new \InvalidArgumentException();
81+
throw new UnknownNotificationException();
8182
}
8283
$notification->setIcon($this->url->getAbsoluteURL($this->url->imagePath('deck', 'deck-dark.svg')));
8384
$params = $notification->getSubjectParameters();

0 commit comments

Comments
 (0)