diff --git a/lib/Activity/Listener.php b/lib/Activity/Listener.php index 624f4f824..f4a294159 100644 --- a/lib/Activity/Listener.php +++ b/lib/Activity/Listener.php @@ -114,7 +114,7 @@ protected function generateNewSignNotificationActivity( ), 'signRequest' => [ 'type' => 'sign-request', - 'id' => $signRequest->getId(), + 'id' => (string)$signRequest->getId(), 'name' => $actor->getDisplayName(), ], ]); @@ -126,12 +126,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 9f0340c5b..bf82f393c 100644 --- a/lib/Listener/NotificationListener.php +++ b/lib/Listener/NotificationListener.php @@ -93,7 +93,7 @@ private function sendSignNotification( 'file' => $this->getFileParameter($signRequest, $libreSignFile), 'signRequest' => [ 'type' => 'sign-request', - 'id' => $signRequest->getId(), + 'id' => (string)$signRequest->getId(), 'name' => $actor->getDisplayName(), ], ]); @@ -122,14 +122,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()]),