mirror of
https://github.com/LibreSign/libresign.git
synced 2025-12-18 05:20:45 +01:00
feat: add custom description to gateway notifications
Support custom signer descriptions in SMS, Signal, Telegram, WhatsApp, and XMPP notifications. The description is prepended to the notification message when provided, allowing personalized instructions through all supported notification channels. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
This commit is contained in:
parent
a4d5a5f854
commit
960af717bc
1 changed files with 8 additions and 2 deletions
|
|
@ -81,10 +81,16 @@ class TwofactorGatewayListener implements IEventListener {
|
|||
}
|
||||
|
||||
$isFirstNotification = $this->signRequestMapper->incrementNotificationCounter($signRequest, $entity->getIdentifierKey());
|
||||
|
||||
$message = '';
|
||||
if (!empty($signRequest->getDescription())) {
|
||||
$message = $signRequest->getDescription() . "\n\n";
|
||||
}
|
||||
|
||||
if ($isFirstNotification) {
|
||||
$message = $this->l10n->t('There is a document for you to sign. Access the link below:');
|
||||
$message .= $this->l10n->t('There is a document for you to sign. Access the link below:');
|
||||
} else {
|
||||
$message = $this->l10n->t('Changes have been made in a file that you have to sign. Access the link below:');
|
||||
$message .= $this->l10n->t('Changes have been made in a file that you have to sign. Access the link below:');
|
||||
}
|
||||
$message .= "\n";
|
||||
$link = $this->urlGenerator->linkToRouteAbsolute('libresign.page.sign', ['uuid' => $signRequest->getUuid()]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue