Merge pull request #51079 from nextcloud/fix/do-not-remind

fix(files_reminders): Do not attempt to send reminders after a user has left a share
pull/51126/head
Pytal 2025-02-27 14:59:42 +07:00 committed by GitHub
commit d05f29cebc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

@ -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(), '/');