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 committed Feb 26, 2025
commit 3898bb8bcc9c0f612b68719039d4d42fb86828d7
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