Skip to content

Commit 064a068

Browse files
chore: url correction
Signed-off-by: Samuelson Brito <samuelsonma@gmail.com>
1 parent 0107ce2 commit 064a068

File tree

4 files changed

+9
-15
lines changed

4 files changed

+9
-15
lines changed

lib/Activity/Listener.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,8 @@ protected function generateSignedEventActivity(
147147
'id' => (string)$libreSignFile->getNodeId(),
148148
'name' => $libreSignFile->getName(),
149149
'path' => $libreSignFile->getName(),
150-
'link' => $this->url->linkToRouteAbsolute('libresign.file.validateFileId', [
151-
'apiVersion' => 'v1',
152-
'fileId' => $libreSignFile->getNodeId(),
150+
'link' => $this->url->linkToRouteAbsolute('libresign.page.validationFilePublic', [
151+
'uuid' => $libreSignFile->getUuid(),
153152
]),
154153

155154
]

lib/AppInfo/Application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function register(IRegistrationContext $context): void {
7575

7676
// Notification listeners
7777
$context->registerEventListener(SendSignNotificationEvent::class, NotificationListener::class);
78-
//$context->registerEventListener(SignedEvent::class, NotificationListener::class);
78+
$context->registerEventListener(SignedEvent::class, NotificationListener::class);
7979

8080
// MailNotify listener
8181
$context->registerEventListener(SendSignNotificationEvent::class, MailNotifyListener::class);

lib/Listener/NotificationListener.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,8 @@ private function sendSignedNotification(
121121
'id' => (string)$libreSignFile->getNodeId(),
122122
'name' => $libreSignFile->getName(),
123123
'path' => $libreSignFile->getName(),
124-
'link' => $this->url->linkToRouteAbsolute('libresign.file.validateFileId', [
125-
'apiVersion' => 'v1',
126-
'fileId' => $libreSignFile->getNodeId(),
124+
'link' => $this->url->linkToRouteAbsolute('libresign.page.validationFilePublic', [
125+
'uuid' => $libreSignFile->getUuid(),
127126
]),
128127
],
129128
]);
@@ -143,7 +142,8 @@ public function isNotificationDisabledAtActivity(IIdentifyMethod $identifyMethod
143142
$notificationSetting = $activityUserSettings->getUserSetting(
144143
$identifyMethod->getEntity()->getIdentifierValue(),
145144
'notification',
146-
'file_to_sign'
145+
'file_to_sign',
146+
'file_signed',
147147
);
148148
if (!$notificationSetting) {
149149
return true;

lib/Notification/Notifier.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function prepare(INotification $notification, string $languageCode): INot
7070
case 'update_sign_request':
7171
return $this->parseSignRequest($notification, $l, true);
7272
case 'file_signed':
73-
return $this->parseSigned($notification, $l, false);
73+
return $this->parseSigned($notification, $l);
7474
default:
7575
throw new UnknownActivityException();
7676
}
@@ -94,7 +94,7 @@ private function parseSignRequest(
9494
);
9595
$notification->addParsedAction($signAction);
9696
if (isset($parameters['from'])) {
97-
$subject = $l->t('{from} signed {file}');
97+
$subject = $l->t('{from} requested your signature on {file}');
9898
$notification->setParsedSubject(
9999
str_replace(
100100
['{from}', '{file}'],
@@ -134,7 +134,6 @@ private function parseSignRequest(
134134
private function parseSigned(
135135
INotification $notification,
136136
IL10N $l,
137-
bool $update,
138137
): INotification {
139138

140139
$parameters = $notification->getSubjectParameters();
@@ -163,10 +162,6 @@ private function parseSigned(
163162
->setRichSubject($subject, $parameters);
164163
}
165164
}
166-
if ($update) {
167-
$notification->setParsedMessage($l->t('Changes have been made in a file that you have to sign.'));
168-
}
169-
170165
if (isset($parameters['signedFile']) && isset($parameters['signedFile']['id'])) {
171166
$dismissAction = $notification->createAction()
172167
->setParsedLabel($l->t('Dismiss notification'))

0 commit comments

Comments
 (0)