aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2025-02-26 14:19:11 -0800
committerChristopher Ng <chrng8@gmail.com>2025-02-26 14:19:11 -0800
commit3898bb8bcc9c0f612b68719039d4d42fb86828d7 (patch)
tree7e54b378f9c8acbd78a41dd9b3e58ec005c51a56 /apps
parent774afcb37542d831065a14cce3bc8408b5924515 (diff)
downloadnextcloud-server-3898bb8bcc9c0f612b68719039d4d42fb86828d7.tar.gz
nextcloud-server-3898bb8bcc9c0f612b68719039d4d42fb86828d7.zip
fix(files_reminders): Do not attempt to send reminders after a user has left a sharefix/do-not-remind
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/files_reminders/lib/Notification/Notifier.php5
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(), '/');