Skip to content

Commit

Permalink
Merge pull request #6623 from nextcloud/bugfix/noid/notification-hand…
Browse files Browse the repository at this point in the history
…ling

fix(notifications): Notifier::prepare() threw \InvalidArgumentExcepti…
  • Loading branch information
juliusknorr authored Dec 30, 2024
2 parents 61019d5 + 6ceecd4 commit 989db86
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Notification/Notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 989db86

Please sign in to comment.