fix(files_reminders): Do not attempt to send reminders after a user has left a share

Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
Christopher Ng 2025-02-26 14:19:11 -08:00
parent 774afcb375
commit 3898bb8bcc

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