summaryrefslogtreecommitdiffstats
path: root/apps/files_reminders
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2023-08-04 09:35:36 -0700
committerAndy Scherzinger <info@andy-scherzinger.de>2023-08-10 12:28:19 +0200
commit72bcafbc0fe864d265d2b510d0fa7ce2a7cdf132 (patch)
treee428f1cd66e68c5d5f3cc5706b4df2d27c96a381 /apps/files_reminders
parent0131005066a64e94a695af4434d3dc700853ede9 (diff)
downloadnextcloud-server-72bcafbc0fe864d265d2b510d0fa7ce2a7cdf132.tar.gz
nextcloud-server-72bcafbc0fe864d265d2b510d0fa7ce2a7cdf132.zip
fix: remove non-existing reminder notification
Signed-off-by: Christopher Ng <chrng8@gmail.com> (cherry picked from commit 0b15feec7ff5e89acee3d918a38e32387fe2f1ce)
Diffstat (limited to 'apps/files_reminders')
-rw-r--r--apps/files_reminders/lib/Notification/Notifier.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files_reminders/lib/Notification/Notifier.php b/apps/files_reminders/lib/Notification/Notifier.php
index 2a919d42cae..c528aa521b1 100644
--- a/apps/files_reminders/lib/Notification/Notifier.php
+++ b/apps/files_reminders/lib/Notification/Notifier.php
@@ -34,6 +34,7 @@ use OCP\AppFramework\Db\DoesNotExistException;
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 @@ class Notifier implements INotifier {
/**
* @throws InvalidArgumentException
+ * @throws AlreadyProcessedException
*/
public function prepare(INotification $notification, string $languageCode): INotification {
$l = $this->l10nFactory->get(Application::APP_ID, $languageCode);
@@ -69,7 +71,7 @@ class Notifier implements INotifier {
try {
$reminder = $this->reminderService->get($reminderId);
} catch (DoesNotExistException $e) {
- throw new InvalidArgumentException();
+ throw new AlreadyProcessedException();
}
try {