matrix-org / matrix-org/matrix-spec
Clarification needed in invite stripped state
- Dominant language
- HTML
- Stars
- 330
- Forks
- 150
- Avg merge
- 2h 21m
- Merged PRs (30d)
- 3
Description
Two areas of the spec doc talk about invite stripped state:
https://matrix.org/docs/spec/client_server/r0.6.1#m-room-member
`invite_room_state` in the Unsigned of your own `m.room.member` event
and
https://matrix.org/docs/spec/client_server/r0.6.1#get-matrix-client-r0-sync
`rooms.invite..invite_state`
The stored event has the `invite_room_state` field but Synapse strips it when including the membership event in `invite_state`. https://github.com/matrix-org/synapse/blob/develop/synapse/rest/client/v2_alpha/sync.py#L326-L341
The `/state` API doesn't work in Synapse pre-join so it seems like a client has no way to ever see a `invite_room_state` in the real world.

js-sdk respects `invite_state` but also expects a `invite_room_state` at the top level (sibling of unsigned) of an event for whatever reason which is obviously wrong.
Contributor guide
Research direction
Compare the two cited Matrix Client-Server specification sections with Synapse's invite handling in synapse/rest/client/v2_alpha/sync.py at lines 326-341. Review the described js-sdk expectations as well. Done means the specification and real-world invite_state behavior are clarified and any inconsistency is explicitly resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100