Client-side follow-up to server federation (accordserver#38).
The Accord server now speaks peer-to-peer federation, but the vendored SDK (packages/accordkit) has no federation support: no origin field on any model, no qualified-ID (<snowflake>@<domain>) handling, and no endpoint to join a remote-homed space. Nothing in the client can currently consume a federated space.
This issue covers the protocol/SDK plumbing that the Flutter UI work depends on.
Task
origin field: add the optional origin (home domain) field that the server now returns on users, spaces, channels, roles, messages, and members. Parse and round-trip it on the relevant Accord* models.
- Qualified IDs: tolerate IDs that cross the wire qualified as
<snowflake>@<domain> without breaking lenient snowflake/timestamp parsing (server strips @domain for timestamps — mirror that). Remote authors also carry fully-qualified handles.
- Join trigger: expose the authed
POST /api/v1/federation/spaces/join call (initiates the join handshake and applies the returned snapshot).
- Remote DMs: surface cross-server DM open against a remote recipient (qualified user id).
- Remote media: ensure emoji/attachment URLs that arrive as absolute home-server CDN URLs are used as-is (not re-pointed at the local CDN).
Pointers
packages/accordkit/lib/src/models/ (add origin)
packages/accordkit/lib/src/rest/ (federation join endpoint)
- Snowflake/timestamp parsing in accordkit (qualified-ID tolerance)
- Server reference:
src/routes/spaces.rs (join_federated_space), src/federation/mapping.rs (qualified-ID helpers), src/federation/handshake.rs (snapshot shape)
Acceptance
Accord* models expose origin and survive a round-trip where IDs are qualified.
- A client can call the federated-space join endpoint and hydrate the returned snapshot (space, channels, roles, members, recent messages).
- Snowflake-derived timestamps still parse for qualified IDs.
Client-side follow-up to server federation (accordserver#38).
The Accord server now speaks peer-to-peer federation, but the vendored SDK (
packages/accordkit) has no federation support: nooriginfield on any model, no qualified-ID (<snowflake>@<domain>) handling, and no endpoint to join a remote-homed space. Nothing in the client can currently consume a federated space.This issue covers the protocol/SDK plumbing that the Flutter UI work depends on.
Task
originfield: add the optionalorigin(home domain) field that the server now returns on users, spaces, channels, roles, messages, and members. Parse and round-trip it on the relevantAccord*models.<snowflake>@<domain>without breaking lenient snowflake/timestamp parsing (server strips@domainfor timestamps — mirror that). Remote authors also carry fully-qualified handles.POST /api/v1/federation/spaces/joincall (initiates the join handshake and applies the returned snapshot).Pointers
packages/accordkit/lib/src/models/(addorigin)packages/accordkit/lib/src/rest/(federation join endpoint)src/routes/spaces.rs(join_federated_space),src/federation/mapping.rs(qualified-ID helpers),src/federation/handshake.rs(snapshot shape)Acceptance
Accord*models exposeoriginand survive a round-trip where IDs are qualified.