Skip to content

MSC4319: Room member events for invite and knock rooms in the /sync response - #4319

Merged
turt2live merged 16 commits into
matrix-org:mainfrom
zecakeh:non-stripped-room-member-in-stripped-state
Jul 27, 2026
Merged

MSC4319: Room member events for invite and knock rooms in the /sync response#4319
turt2live merged 16 commits into
matrix-org:mainfrom
zecakeh:non-stripped-room-member-in-stripped-state

Conversation

@zecakeh

@zecakeh zecakeh commented Aug 1, 2025

Copy link
Copy Markdown
Contributor

Rendered

This was spawned by the discussion in matrix-org/matrix-spec#2181.

Server Implementations:

Most clients already rely on being able to access the m.room.member events of the knock or invite process, and of the inviter.

The following client implementations also rely on being able to access the origin_server_ts:

This client implementation supports the new state key:


SCT Stuff:

MSC checklist

FCP tickyboxes

zecakeh added 2 commits August 1, 2025 16:07
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
@zecakeh zecakeh changed the title MSCXXXX: Non-stripped room member event in stripped state MSC4319: Non-stripped room member event in stripped state Aug 1, 2025
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
@tulir tulir added proposal A matrix spec change proposal. Process state. A-Client Server Client-Server API kind:maintenance MSC which clarifies/updates existing spec labels Aug 1, 2025
Comment thread proposals/4319-non-stripped-member-in-stripped-state.md Outdated
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
@zecakeh zecakeh changed the title MSC4319: Non-stripped room member event in stripped state MSC4319: Room member events in stripped state Aug 30, 2025
Comment thread proposals/4319-room-member-events-for-invite-knock-sync-response.md
Comment thread proposals/4319-room-member-events-for-invite-knock-sync-response.md
Comment thread proposals/4319-room-member-events-in-stripped-state.md Outdated
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Comment thread proposals/4319-room-member-events-in-stripped-state.md Outdated
Comment thread proposals/4319-room-member-events-for-invite-knock-sync-response.md
Comment thread proposals/4319-room-member-events-in-stripped-state.md Outdated
Comment thread proposals/4319-room-member-events-for-invite-knock-sync-response.md Outdated
Comment thread proposals/4319-room-member-events-in-stripped-state.md Outdated
@zecakeh zecakeh changed the title MSC4319: Room member events in stripped state MSC4319: Room member events for invite and knock rooms in the /sync response Dec 29, 2025
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
@zecakeh

zecakeh commented Dec 29, 2025

Copy link
Copy Markdown
Contributor Author

There are implementations for the latest state of the MSC in:

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
@github-project-automation github-project-automation Bot moved this to Tracking for review in Spec Core Team Workflow Jan 21, 2026
@turt2live turt2live moved this from Tracking for review to Proposed for FCP readiness in Spec Core Team Workflow Jan 21, 2026
@mscbot mscbot added proposed-final-comment-period Currently awaiting signoff of a majority of team members in order to enter the FCP. Process state. disposition-merge Process state. labels Mar 23, 2026
@turt2live turt2live moved this from Proposed for FCP readiness to Ready for FCP ticks in Spec Core Team Workflow Mar 23, 2026
@turt2live turt2live added the 00-weekly-pings Tracking for weekly pings in the SCT office. 00 to make it first in the labels list. label Mar 23, 2026

@anoadragon453 anoadragon453 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM other than one small clarification.

Comment thread proposals/4319-room-member-events-for-invite-knock-sync-response.md Outdated
Comment thread proposals/4319-room-member-events-for-invite-knock-sync-response.md Outdated
Comment thread proposals/4319-room-member-events-for-invite-knock-sync-response.md
Comment thread proposals/4319-room-member-events-for-invite-knock-sync-response.md Outdated
Comment thread proposals/4319-room-member-events-for-invite-knock-sync-response.md Outdated
zecakeh added 2 commits May 22, 2026 10:28
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
Comment thread proposals/4319-room-member-events-for-invite-knock-sync-response.md
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
@mscbot

mscbot commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

🔔 This is now entering its final comment period, as per the review above. 🔔

@mscbot mscbot added final-comment-period Process state to accept, reject, or postpone an MSC. and removed proposed-final-comment-period Currently awaiting signoff of a majority of team members in order to enter the FCP. Process state. labels Jul 22, 2026
@turt2live turt2live removed the 00-weekly-pings Tracking for weekly pings in the SCT office. 00 to make it first in the labels list. label Jul 22, 2026
@turt2live turt2live moved this from Ready for FCP ticks to In FCP in Spec Core Team Workflow Jul 22, 2026
Comment thread proposals/4319-room-member-events-for-invite-knock-sync-response.md
Comment on lines +195 to +197
Using the full event format might give the wrong idea that this state has been validated by the
homeserver, which is currently not possible
(see [this discussion in MSC4311](https://github.com/matrix-org/matrix-spec-proposals/pull/4311#discussion_r2274781824)).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This equally applies to the new state with full events as well. The invite membership event is not "validated" (checked to pass auth rules).

Related reading on outliers and out-of-band membership events in the Synapse docs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't say that the event that we place in state was validated though. It just explains why we should avoid as much as possible to provide the full event format.

Maybe this should be clarified in the spec PR for this MSC?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using full state event in state has the same drawbacks of using the full state events in invite_room_state.

I'm not seeing the benefit of the complexity around having both state and invite_room_state (which will be hard to understand from a newcomers perspective) when we could just use full events in invite_room_state with some better notes in the spec.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this introduces additional complexity, that doesn't seem that beneficial. It would be much easier and more backwards compatible to simply have those events in the invite_state as before.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original concern of this thread regarding validation of events has a long and storied history. The conclusion is validation isn't needed right now because the data remains untrusted by nature. If/when a future MSC includes the full recursive auth chain, then servers can verify the invite.

For the concern of having two fields doing different things: another MSC to deprecate [invite|knock]_state is welcome. This MSC would not be the one to make that change. If that future MSC were to move quickly enough through the process, I'd suggest that the spec PR for this MSC and that future MSC incorporate both changes (potentially delaying this MSC's merge date).

> The example for the response of `GET /sync` includes the stripped `m.room.member` event although
> it is not specified.

### `m.room.member` event of the `sender` of the invite

@MadLittleMods MadLittleMods Jul 22, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this MSC should solely propose this change on its own: Include the m.room.member for the invite/knock event itself AND m.room.member event for the sender of the invite in stripped state.

All of the extra complexity around clients wanting access to event_id, origin_server_ts, or even full state events is a separate topic. I don't believe the complexity around state vs invite_state is a great approach.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The purpose of this MSC is to specify behavior that has already been implemented for a long time in some homeservers and clients while not being part of the spec.

It turns out that the current implementations rely on an undesirable API (like mixing event formats) so the extra complexity is needed to have a more consistent API at the cost of requiring changes in implementations.

I don't believe that wanting to access the extra fields is a separate topic because it is all about clients having enough data to present/handle invites and knocks. Without the extra fields, the m.room.member for the invite/knock event itself isn't very useful because it doesn't really provide more data (we can already infer the membership).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The stripped state version does provide value: The invite is useful to see the invite reason and sender and including the m.room.member of the sender gives you access to the display name/avatar of the person that invited you.

I would consider the current Synapse behavior flawed and including the full state event probably was a simple oversight (element-hq/synapse@ab9cf73).

The only examples of clients that use this extra information are progressive enhancement examples. We can equally instead fix the spec and the Synapse implementation to do the right thing without the clients losing much at all for spec-compliant homeservers. The desire for more info is valid and can be separately advanced in its own MSC that adds the necessary metadata (whatever solution that may be).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SCT has previously expressed interest in consistency: either return full state events, or don't. There should not be a mix of formats. The SCT has also expressed that continuing to call it "stripped state" when it contains fully formatted events is wrong. There's also mild opinions around naming it specifically "[invite|knock]_state" when it's the same thing regardless of membership type - it doesn't need to be overly qualified.

These considerations are mentioned somewhere in the depths of #4311, alongside other arguments not relevant to this proposal.

Whether the information is valuable or not is somewhat irrelevant - the format should be consistent, and getting the information needed from an m.room.member event means it's best formatted as a real event. Therefore, all previously-stripped state events should be formatted as real events too.

@MadLittleMods MadLittleMods Jul 28, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is valuable to confirm that this half-baked state that this MSC ships is not great.

I still think this MSC should have simply defined the extra m.room.member events in stripped state and then another MSC would propose returning full state events for the further use cases.

It sounds like the way forward now that this MSC is merged is to just define that all stripped state events should be presented as full state events in state. Based on #4319 (comment), perhaps even deprecating invite_state/knock_state

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be my preferred direction, as an individual.

Introducing m.room.member as stripped state provides none of the useful information to clients while the full event does. We are currently opposed to mixing formats within the same structure, so a new field is required.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Introducing m.room.member as stripped state provides none of the useful information to clients

(it does, see "The stripped state version does provide value:" above)

There are other use cases it doesn't cover but those are the things to be covered by the further MSC.

Comment on lines +70 to +73
For compatibility with the current client implementations, homeservers SHOULD also continue to
include this event in the `events` array of the `invite_state` or `knock_state` in the same format
as in `State` for a time limited to 1 spec release after this proposal is released in a new spec
version.

@MadLittleMods MadLittleMods Jul 22, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What other clients have relied on the full state of the invite/knock being available?

The only example given so far has been Draupnir wanting event_id.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the description of the PR there are a couple of clients accessing the origin_server_ts.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like much too short of a timeline. I think quite a few clients rely on this event being in the invite_state, even if it is stripped. Removing that after 3 months, when until then clients couldn't rely on it being elsewhere and breaking every client someone might have gotten from a distro repo like Ubuntu, is a bit problematic. But I guess servers will have to support it in both places for longer, if they support an old spec version?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version of the spec matters less here. The timeline is probably a bit short, but as a SHOULD there's room for servers to make the best decision for their local ecosystems. Some servers may be able to move faster, some slower - this MSC sets a guideline for what to aim for.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
@mscbot

mscbot commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

The final comment period, with a disposition to merge, as per the review above, is now complete.

@mscbot mscbot added finished-final-comment-period FCP has finished. Process state. and removed disposition-merge Process state. final-comment-period Process state to accept, reject, or postpone an MSC. labels Jul 27, 2026
@turt2live
turt2live merged commit 44ec84c into matrix-org:main Jul 27, 2026
1 check passed
@turt2live turt2live moved this from In FCP to Requires spec writing in Spec Core Team Workflow Jul 27, 2026
@turt2live turt2live added spec-pr-missing MSC is accepted, but missing spec PR. Process state. and removed finished-final-comment-period FCP has finished. Process state. labels Jul 27, 2026
@zecakeh
zecakeh deleted the non-stripped-room-member-in-stripped-state branch July 29, 2026 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Client Server Client-Server API kind:maintenance MSC which clarifies/updates existing spec proposal A matrix spec change proposal. Process state. spec-pr-missing MSC is accepted, but missing spec PR. Process state.

Projects

Status: Requires spec writing

Development

Successfully merging this pull request may close these issues.

10 participants