diff options
Diffstat (limited to 'apps/files_reminders/lib/Notification')
-rw-r--r-- | apps/files_reminders/lib/Notification/Notifier.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/files_reminders/lib/Notification/Notifier.php b/apps/files_reminders/lib/Notification/Notifier.php index 000b04119cd..337ef04c814 100644 --- a/apps/files_reminders/lib/Notification/Notifier.php +++ b/apps/files_reminders/lib/Notification/Notifier.php @@ -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(), '/'); @@ -75,7 +76,7 @@ class Notifier implements INotifier { [ 'name' => [ 'type' => 'highlight', - 'id' => $node->getId(), + 'id' => (string)$node->getId(), 'name' => $node->getName(), ], ], |