Skip to content

wip(183): scaffold fanout service#316

Open
Johnalex-hub wants to merge 1 commit into
codebestia:mainfrom
Johnalex-hub:feat/183-fanout-service
Open

wip(183): scaffold fanout service#316
Johnalex-hub wants to merge 1 commit into
codebestia:mainfrom
Johnalex-hub:feat/183-fanout-service

Conversation

@Johnalex-hub

Copy link
Copy Markdown

PR description:

Implements apps/backend/src/services/fanout.ts: given an unsent message plus a sender-provided { recipientDeviceId → ciphertext } map, validates the device set exactly matches current active recipient devices before persisting.

Resolves conversation members → their active (non-revoked) userDevices, excluding sender's own sending device
If client's provided device set doesn't match, returns device_set_mismatch with the authoritative device list (no silent drop, no guessed ciphertext)
Message insert + bulk envelope insert run in a single db.transaction
Sender's other devices included in the authoritative set (multi-device self-sync)

Closes #183

@Johnalex-hub Johnalex-hub force-pushed the feat/183-fanout-service branch from c6ffdd4 to 52ab92e Compare June 30, 2026 09:14
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.

Fan-out service: resolve members → devices → envelopes

1 participant