Skip to content

[stable33] fix: deliver sign invitations to email-identified existing users - #9509

Merged
vitormattos merged 16 commits into
stable33from
backport/9429/stable33
Nov 14, 2026
Merged

vitormattos merged 16 commits into
stable33from
backport/9429/stable33

Conversation

@backportbot-libresign

@backportbot-libresign backportbot-libresign Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Backport of #9429 to stable33.

Stable-specific adaptation

Unlike main, this stable uses MailNotifyListener to invoke MailService directly and records notification history using SignRequestMapper. The backport keeps that architecture, uses the resolved eligible email rather than redundantly resolving it a second time, and applies administrator policy to email-identified invitations while retaining account UID preferences and cancellation behavior.

Review handoff

  • Compared to fix: deliver sign invitations to email-identified existing users #9429 and adapted to the stable notification pipeline.
  • Removed duplicated recipient lookup and post-resolution preference decisions.
  • Replaced main-only notification tests with stable-specific listener and policy tests.
  • No merge conflicts against stable33 (GitHub mergeability checked).
  • New incremental commits are cryptographically signed and DCO verified; latest HEAD has no [skip ci] marker, so CI is enabled.
  • Full GitHub CI / live Nextcloud integration: reviewer/maintainer follows up separately.

Adapted listener unit tests to the stable MailService + SignRequestMapper architecture, replacing main-only NotificationMessage/MailChannel fixtures. In an isolated PHP 8.4/OCP test harness, 18 listener tests (38 assertions) and 13 preference-resolver tests (38 assertions) passed; full GitHub CI and live Nextcloud integration remain unverified.

History: The backport bot created two empty commits, retained to avoid rewriting signed/DCO history. Earlier bot commits may include [skip ci]; new signed HEAD commits allow CI to run. These historical empty commits change no files. No merge performed.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Remove unused listener dependencies and resolve account notification
preferences by UID, leaving email-identified signers on mail delivery.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Use event inputs and delivery outputs instead of passing messages through
MailChannel and MailService in listener tests. Cover invitation, reminder,
account preferences, shared emails, cancellation and signed notices.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Keep account-based cancellation preferences when a signer was identified
by email, without reintroducing invitation suppression from issue #9425.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…coupling

Cover existing-account cancellation opt-outs, external recipients, unknown
methods and empty addresses. Keep mock configuration readable and assert
observable delivery intents instead of internal invocation sequences.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
The Nextcloud user manager returns an empty list when no users match an
email address. Model that contract explicitly in the regression test,
preventing count(null) across the PHPUnit database matrix.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Keep the only available invitation channel independent of the linked
account's personal opt-out while respecting the administrator's channel
setting. Cover Activity and app-config fallback paths.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Use UID/type-aware preference maps, assert the listener never mutates
legacy notification history, and mirror deleted-account metadata fixtures.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Restore global notification settings after the account-search opt-out
scenario and explicitly enable invitation mail in the PDF validation
scenario, avoiding an implicit dependency on shard execution order.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
refactor: make email recipient policy self-documenting

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>

[skip ci]
Avoid re-resolving recipients after eligibility and preference checks.
Keep the existing stable mail delivery and history paths.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
…on pipeline

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos
vitormattos marked this pull request as ready for review November 14, 2026 22:34
@vitormattos
vitormattos requested a review from a team as a code owner November 14, 2026 22:34
@vitormattos
vitormattos merged commit f7454a0 into stable33 Nov 14, 2026
64 of 65 checks passed
@vitormattos
vitormattos deleted the backport/9429/stable33 branch November 14, 2026 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant