diff --git a/lib/Activity/Listener.php b/lib/Activity/Listener.php index 11b21d990b..7233a83f16 100644 --- a/lib/Activity/Listener.php +++ b/lib/Activity/Listener.php @@ -98,7 +98,7 @@ protected function generateNewSignNotificationActivity( ), 'signRequest' => [ 'type' => 'sign-request', - 'id' => $signRequest->getId(), + 'id' => (string)$signRequest->getId(), 'name' => $actor->getDisplayName(), ], ]); @@ -110,12 +110,12 @@ protected function generateNewSignNotificationActivity( } /** - * @return array{type: 'file', id: int, name: string, path: string, link: string} + * @return array{type: 'file', id: string, name: string, path: string, link: string} */ protected function getFileParameter(SignRequest $signRequest, FileEntity $libreSignFile): array { return [ 'type' => 'file', - 'id' => $libreSignFile->getNodeId(), + 'id' => (string)$libreSignFile->getNodeId(), 'name' => $libreSignFile->getName(), 'path' => $libreSignFile->getName(), 'link' => $this->url->linkToRouteAbsolute('libresign.page.sign', ['uuid' => $signRequest->getUuid()]), diff --git a/lib/Listener/NotificationListener.php b/lib/Listener/NotificationListener.php index 3573010114..f9dca5e2ea 100644 --- a/lib/Listener/NotificationListener.php +++ b/lib/Listener/NotificationListener.php @@ -77,7 +77,7 @@ private function sendSignNotification( 'file' => $this->getFileParameter($signRequest, $libreSignFile), 'signRequest' => [ 'type' => 'sign-request', - 'id' => $signRequest->getId(), + 'id' => (string)$signRequest->getId(), 'name' => $actor->getDisplayName(), ], ]); @@ -106,14 +106,12 @@ public function isNotificationDisabledAtActivity(IIdentifyMethod $identifyMethod } /** - * @return (int|string)[] - * - * @psalm-return array{type: 'file', id: int, name: string, path: string, link: string} + * @psalm-return array{type: 'file', id: string, name: string, path: string, link: string} */ protected function getFileParameter(SignRequest $signRequest, FileEntity $libreSignFile): array { return [ 'type' => 'file', - 'id' => $libreSignFile->getNodeId(), + 'id' => (string)$libreSignFile->getNodeId(), 'name' => $libreSignFile->getName(), 'path' => $libreSignFile->getName(), 'link' => $this->url->linkToRouteAbsolute('libresign.page.sign', ['uuid' => $signRequest->getUuid()]),