Merge pull request #51121 from nextcloud/backport/51079/stable31

[stable31] fix(files_reminders): Do not attempt to send reminders after a user has left a share
This commit is contained in:
Andy Scherzinger 2025-03-02 18:04:32 +01:00 committed by GitHub
commit e7039ccc6e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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