Skip to content

Commit 0e2b729

Browse files
fix: route file service URLs by sign request UUID
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 9e92892 commit 0e2b729

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

lib/Service/FileService.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ private function initializeFileData(): void {
107107
$this->fileData->nodeId = 0;
108108
$this->fileData->nodeType = 'file';
109109
$this->fileData->created_at = '';
110-
$this->fileData->signUuid = null;
111110
$this->fileData->metadata = [];
112111
$this->fileData->signatureFlow = SignatureFlow::PARALLEL->value;
113112
$this->fileData->signers = [];
@@ -217,7 +216,6 @@ public function showSettings(bool $show = true): self {
217216
$this->fileData->settings = [
218217
'canSign' => false,
219218
'canRequestSign' => false,
220-
'signerFileUuid' => null,
221219
'phoneNumber' => '',
222220
];
223221
} else {
@@ -410,16 +408,18 @@ private function loadSignRequestData(): void {
410408
return;
411409
}
412410

413-
$this->fileData->url = $this->urlGenerator->linkToRoute('libresign.page.getPdfFile', ['uuid' => $this->fileData->uuid]);
411+
$pdfRouteUuid = $this->fileData->uuid;
414412

415413
if (!empty($this->fileData->signers) && is_array($this->fileData->signers)) {
416414
foreach ($this->fileData->signers as $signer) {
417-
if (!empty($signer->me) && isset($signer->sign_uuid)) {
418-
$this->fileData->signUuid = $signer->sign_uuid;
415+
if (!empty($signer->me) && isset($signer->sign_request_uuid)) {
416+
$pdfRouteUuid = $signer->sign_request_uuid;
419417
break;
420418
}
421419
}
422420
}
421+
422+
$this->fileData->url = $this->urlGenerator->linkToRoute('libresign.page.getPdfFile', ['uuid' => $pdfRouteUuid]);
423423
}
424424

425425
private function loadFileMetadata(): void {

0 commit comments

Comments
 (0)