diff options
author | Christopher Ng <chrng8@gmail.com> | 2025-02-26 14:19:11 -0800 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2025-02-27 23:00:38 +0000 |
commit | 1bc3e66c074ee887747a501dc703d74e74fc7c11 (patch) | |
tree | 6ad1b43bd382bd74def85897871fd0853eaa51db | |
parent | be8902cdb86938880147bf7fa0b9feefe95340d1 (diff) | |
download | nextcloud-server-backport/51079/stable31.tar.gz nextcloud-server-backport/51079/stable31.zip |
fix(files_reminders): Do not attempt to send reminders after a user has left a sharebackport/51079/stable31
Signed-off-by: Christopher Ng <chrng8@gmail.com>
-rw-r--r-- | apps/files_reminders/lib/Notification/Notifier.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files_reminders/lib/Notification/Notifier.php b/apps/files_reminders/lib/Notification/Notifier.php index 000b04119cd..565ef9a4695 100644 --- a/apps/files_reminders/lib/Notification/Notifier.php +++ b/apps/files_reminders/lib/Notification/Notifier.php @@ -14,6 +14,7 @@ use OCP\Files\FileInfo; use OCP\Files\IRootFolder; use OCP\IURLGenerator; use OCP\L10N\IFactory; +use OCP\Notification\AlreadyProcessedException; use OCP\Notification\IAction; use OCP\Notification\INotification; use OCP\Notification\INotifier; @@ -51,8 +52,8 @@ class Notifier implements INotifier { $fileId = $params['fileId']; $node = $this->root->getUserFolder($notification->getUser())->getFirstNodeById($fileId); - if (!$node) { - throw new UnknownNotificationException(); + if ($node === null) { + throw new AlreadyProcessedException(); } $path = rtrim($node->getPath(), '/'); |