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 3005674 commit 858de95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Notification/Notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

namespace OCA\FlowNotifications\Notification;

use InvalidArgumentException;
use OCA\FlowNotifications\AppInfo\Application;
use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\Notification\INotification;
use OCP\Notification\INotifier;
use OCP\Notification\UnknownNotificationException;
use OCP\WorkflowEngine\EntityContext\IContextPortation;
use OCP\WorkflowEngine\EntityContext\IDisplayText;
use OCP\WorkflowEngine\EntityContext\IIcon;
Expand Down Expand Up @@ -49,7 +49,7 @@ public function getName(): string {
*/
public function prepare(INotification $notification, string $languageCode): INotification {
if ($notification->getApp() !== Application::APP_ID) {
throw new InvalidArgumentException();
throw new UnknownNotificationException();
}

/** @var IEntity $entity */
Expand Down

0 comments on commit 858de95

Please sign in to comment.