Skip to content

Commit 2bb2f62

Browse files
committed
fix(notifier): Fix subject parameters being strings
Signed-off-by: Joas Schilling <coding@schilljs.com>
1 parent daf7208 commit 2bb2f62

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/Notification/Notifier.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
use OCA\Files_Retention\AppInfo\Application;
1212
use OCP\Files\IRootFolder;
13+
use OCP\Files\Node;
1314
use OCP\IURLGenerator;
1415
use OCP\L10N\IFactory;
1516
use OCP\Notification\AlreadyProcessedException;
@@ -47,6 +48,7 @@ public function prepare(INotification $notification, string $languageCode): INot
4748
if (empty($nodes)) {
4849
throw new AlreadyProcessedException();
4950
}
51+
/** @var Node $node */
5052
$node = array_pop($nodes);
5153

5254
$l = $this->l10Factory->get(Application::APP_ID, $languageCode);
@@ -55,9 +57,9 @@ public function prepare(INotification $notification, string $languageCode): INot
5557
[
5658
'file' => [
5759
'type' => 'file',
58-
'id' => $node->getId(),
60+
'id' => (string)$node->getId(),
5961
'name' => $node->getName(),
60-
'path' => $userFolder->getRelativePath($node->getPath()),
62+
'path' => (string)$userFolder->getRelativePath($node->getPath()),
6163
'mimetype' => $node->getMimetype(),
6264
'link' => $this->url->linkToRouteAbsolute('files.viewcontroller.showFile', ['fileid' => $fileId]),
6365
],

0 commit comments

Comments
 (0)