Skip to content

feat: custom message for signers#6216

Merged
vitormattos merged 17 commits intomainfrom
feat/custom-message-for-signers
Dec 17, 2025
Merged

feat: custom message for signers#6216
vitormattos merged 17 commits intomainfrom
feat/custom-message-for-signers

Conversation

@vitormattos
Copy link
Copy Markdown
Member

image image

@vitormattos vitormattos added this to the Next Major (33) milestone Dec 16, 2025
@vitormattos vitormattos self-assigned this Dec 16, 2025
@github-project-automation github-project-automation Bot moved this to 0. Needs triage in Roadmap Dec 16, 2025
@vitormattos
Copy link
Copy Markdown
Member Author

/backport to stable32

@vitormattos
Copy link
Copy Markdown
Member Author

/backport to stable31

Include signer description in notification metadata when incrementing
notification counter. This allows tracking custom messages sent to
signers for each notification attempt.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add optional description parameter to notifyUnsignedUser and
notifySignDataUpdated methods. When provided, the custom message is
prepended to the email body, allowing personalized instructions for
signers.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add explicit check for Activity admin (global) setting before checking
user preference in email notifications. This ensures that when an admin
disables email notifications globally, users cannot override it with
their personal settings. The admin setting acts as a gate that must be
enabled for user preferences to take effect.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add explicit check for Activity admin (global) setting before checking
user preference for in-app notifications. This ensures consistency
across all notification channels and prevents users from enabling
notifications when disabled globally by the admin.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
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>
Add description, displayName, notify, and acceptsEmailNotifications
fields to OpenAPI response type definitions for LibresignNewSigner
and LibresignIdentifyAccount.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Include acceptsEmailNotifications field in search results for account
method signers. This field indicates whether a user accepts email
notifications based on both Activity admin settings and user
preferences. Returns false when user has no email, Activity app is
unavailable, or notifications are disabled at admin or user level.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Update OpenAPI schemas to include acceptsEmailNotifications in
LibresignIdentifyAccount and description/displayName/notify in
LibresignNewSigner types.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add switch-based UI to enable custom messages for signers during
identification. The custom message field:
- Appears conditionally based on method and email notification settings
- Is hidden for account method when user doesn't accept email
- Supports up to 500 characters with 3-row textarea
- Resets when toggled off or signer changes to non-accepting account
- Is saved as part of signer data

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add 'Customize message' action button in signature request sidebar for
signed requests. The button:
- Appears with Bell icon alongside other actions
- Opens signer identification modal for message editing
- Validates signer state, method, and email notification preferences
- Is hidden when signer already signed, for current user, or when
  account method user doesn't accept email notifications

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add integration tests verifying acceptsEmailNotifications field in
account search endpoint:
- Returns true when both global and user settings enable notifications
- Returns false when user explicitly disables notifications
- Returns false when admin disables globally (even if user enables)

Tests cover Activity app integration and admin/user setting precedence.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Add integration tests for custom signer messages:
- Account method with and without custom description
- Email method with default and custom description via reminder
- Verifies description appears in email body before default message
- Uses Activity email notification settings in background setup

Tests cover the complete flow from request creation to email delivery.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
When Activity app doesn't know about LibreSign's notification settings
(common in test environments or fresh installations), we should allow
notifications by default instead of blocking them.

This fix checks if the Activity manager has the setting registered before
enforcing the admin setting. If the setting is not found, notifications
are allowed, respecting LibreSign's isDefaultEnabledMail() and
isDefaultEnabledNotification() which return true.

Fixes email and notification delivery in integration tests.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos vitormattos force-pushed the feat/custom-message-for-signers branch from bb224fe to 263a8cf Compare December 16, 2025 22:14
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
- Changed CaIdentifierService to use system's instanceid from config.php
- Removed custom instance_id generation logic using ISecureRandom
- Updated unit tests to mock IConfig and verify correct instanceid usage
- This fixes race condition in certificate generation during integration tests

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
This reverts commit 8f71e6c.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Change regex pattern from [a-z0-9]{10} (exactly 10 chars) to [a-z0-9]+
(one or more chars) to accept variable-length instance identifiers.
This makes tests more resilient to changes in instance ID generation
while maintaining validation of the CA ID format.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos vitormattos force-pushed the feat/custom-message-for-signers branch from 0848b2f to 587d80d Compare December 17, 2025 00:48
@vitormattos vitormattos merged commit 9a9ca2b into main Dec 17, 2025
45 of 49 checks passed
@vitormattos vitormattos deleted the feat/custom-message-for-signers branch December 17, 2025 00:48
@github-project-automation github-project-automation Bot moved this from 0. Needs triage to 4. to release in Roadmap Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant