Skip to content

Federation: model qualified IDs and the origin field across user/member/message #153

Description

@krazyjakee

The server now distinguishes local entities (bare snowflake IDs) from remote/federated ones, which carry qualified IDs of the form <snowflake>@<domain> plus an origin field naming the home domain.

What to do

  • Add an origin (home domain) field to the client's user, member, and message models; treat null/absent as local.
  • Parse qualified IDs (<snowflake>@<domain>) wherever the client currently assumes a bare snowflake (author IDs, member IDs, mentions, DM recipients, reaction actors).
  • Provide a small helper to split a qualified ID into (snowflake, domain) and to detect isRemote.
  • Ensure equality/lookup/caching keys use the full qualified ID so a remote 123@b.example never collides with a local 123.

Acceptance

  • Models round-trip the origin field from the API/gateway.
  • Remote and local entities with the same snowflake are never conflated.

Server reference

  • origin on User/PublicUser: src/models/user.rs; on Message: src/models/message.rs.
  • Qualified-ID model + mapping: src/federation/mapping.rs.

Server reference — accordserver branch claude/federated-servers-xlydlj.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfederationCross-server (peer-to-peer) federation

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions