Skip to content

Commit

Permalink
Merge pull request #51079 from nextcloud/fix/do-not-remind
Browse files Browse the repository at this point in the history
fix(files_reminders): Do not attempt to send reminders after a user has left a share
  • Loading branch information
Pytal authored Feb 27, 2025
2 parents 6900ac9 + 3898bb8 commit d05f29c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/files_reminders/lib/Notification/Notifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
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;
Expand Down Expand Up @@ -51,8 +52,8 @@ public function prepare(INotification $notification, string $languageCode): INot
$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(), '/');
Expand Down

0 comments on commit d05f29c

Please sign in to comment.