matrix-org / matrix-org/matrix-spec

Clarification needed in invite stripped state

Open
#848 2 comments 0 reactions 0 assignees View on GitHub
clarification
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.

![image](https://user-images.githubusercontent.com/2403652/122575187-62dff800-d048-11eb-9ee9-d2c9cb0f44de.png)

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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.