Skip to content

Commit

Permalink
fix(notifications): Notifier::prepare() threw \InvalidArgumentExcepti…
Browse files Browse the repository at this point in the history
…on which is deprecated

Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen committed Dec 20, 2024
1 parent 774b5f1 commit 6ceecd4
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 6ceecd4

Please sign in to comment.