matrix-org / matrix-org/matrix-spec

Archived state for a room is not well defined, and state delta requirement seems unimplemented and cumbersome for clients

Open
#814 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

clarification
Dominant language
HTML
Stars
330
Forks
150
Avg merge
2h 21m
Merged PRs (30d)
3

Description

**Link to problem area**:
https://matrix.org/docs/spec/client_server/latest#get-matrix-client-r0-sync

**Issue**
`invite_state` for invited room says that:
> If the client joins the room then the current state will be given as a delta against the archived state not the invite_state.

A room is apparently in archived state when it has membership "leave" but /forgot hasn't been called on it yet (which only the client that calls /forget can known about fwiw). This doesn't seem to be explicitly explained anywhere in the spec.

Also, are server implementations actually serving this delta? It's somewhat annoying for clients to implement keeping state around for **any** left room, given that they can't know if any other device has called /forget on it.

It seems like an uncommon case to optimize, and was probably introduced before lazy loading members was a thing. If it is not relevant anymore, perhaps it can be removed?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked client-server specification section for GET /sync, focusing on invite_state, archived rooms, and state deltas. Review the four existing comments before deciding whether the behavior needs clearer documentation or removal. Done means the archived-state semantics and the expected client/server behavior are unambiguous.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.