diff --git a/apps/files_reminders/lib/Notification/Notifier.php b/apps/files_reminders/lib/Notification/Notifier.php index 2a919d42cae83..c528aa521b177 100644 --- a/apps/files_reminders/lib/Notification/Notifier.php +++ b/apps/files_reminders/lib/Notification/Notifier.php @@ -34,6 +34,7 @@ use OCP\Files\FileInfo; use OCP\IURLGenerator; use OCP\L10N\IFactory; +use OCP\Notification\AlreadyProcessedException; use OCP\Notification\IAction; use OCP\Notification\INotification; use OCP\Notification\INotifier; @@ -55,6 +56,7 @@ public function getName(): string { /** * @throws InvalidArgumentException + * @throws AlreadyProcessedException */ public function prepare(INotification $notification, string $languageCode): INotification { $l = $this->l10nFactory->get(Application::APP_ID, $languageCode); @@ -69,7 +71,7 @@ public function prepare(INotification $notification, string $languageCode): INot try { $reminder = $this->reminderService->get($reminderId); } catch (DoesNotExistException $e) { - throw new InvalidArgumentException(); + throw new AlreadyProcessedException(); } try {