Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(files_reminders): Do not attempt to send reminders after a user h…
…as left a share

Signed-off-by: Christopher Ng <[email protected]>
  • Loading branch information
Pytal authored and backportbot[bot] committed Feb 27, 2025
commit 1bc3e66c074ee887747a501dc703d74e74fc7c11
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
Loading