Skip to content

Fix add-to local delivery resolution using caller's domain instead of… - #33

Merged
markmnl merged 2 commits into
mainfrom
fix/add-recipients-local-domain
Aug 2, 2026
Merged

Fix add-to local delivery resolution using caller's domain instead of…#33
markmnl merged 2 commits into
mainfrom
fix/add-recipients-local-domain

Conversation

@markmnl

@markmnl markmnl commented Aug 2, 2026

Copy link
Copy Markdown
Owner

… the instance's own

resolveLocalDelivery decided which newly-added recipients were local by parsing the domain out of the requesting identity, not this webapi instance's own domain. That's correct for Send (the owner is always local to their own home server) but wrong for AddRecipients, where any existing participant — including a federated one on a different domain — may add recipients. When a federated participant added a recipient who actually was local to this instance, resolveLocalDelivery treated them as remote and skipped them, while fmsgd's outbound sender also skips local-domain recipients assuming webapi already handled them. Neither side resolved delivery, leaving it stuck pending indefinitely.

Adds a required FMSG_DOMAIN env var carrying this instance's own domain, threaded through MessageHandler as LocalDomain and used at both resolveLocalDelivery call sites instead of parsing it from the caller's identity. fmsg-docker's compose files already pass FMSG_DOMAIN to the fmsg-webapi service, so no deployment changes are needed there.

markmnl and others added 2 commits August 2, 2026 10:35
… the instance's own

resolveLocalDelivery decided which newly-added recipients were local by
parsing the domain out of the requesting identity, not this webapi
instance's own domain. That's correct for Send (the owner is always
local to their own home server) but wrong for AddRecipients, where any
existing participant — including a federated one on a different domain
— may add recipients. When a federated participant added a recipient
who actually was local to this instance, resolveLocalDelivery treated
them as remote and skipped them, while fmsgd's outbound sender also
skips local-domain recipients assuming webapi already handled them.
Neither side resolved delivery, leaving it stuck pending indefinitely.

Adds a required FMSG_DOMAIN env var carrying this instance's own
domain, threaded through MessageHandler as LocalDomain and used at
both resolveLocalDelivery call sites instead of parsing it from the
caller's identity. fmsg-docker's compose files already pass
FMSG_DOMAIN to the fmsg-webapi service, so no deployment changes are
needed there.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@markmnl
markmnl enabled auto-merge (squash) August 2, 2026 00:40
@markmnl
markmnl disabled auto-merge August 2, 2026 01:00
@markmnl
markmnl merged commit bd43ee3 into main Aug 2, 2026
1 check passed
@markmnl
markmnl deleted the fix/add-recipients-local-domain branch August 2, 2026 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant