From 506bc1a164923ecd17a0e6fcb928c0415afbb27f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Fri, 25 Jul 2025 09:56:33 +0200 Subject: [PATCH 1/2] Clarify that stripped state in /sync response must include `m.room.member` event of user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit And that event has the same format as in join rooms, with `event_id` and `origin_server_ts`. This has always been the case in homeserver implementations. Signed-off-by: Kévin Commaille --- data/api/client-server/sync.yaml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/data/api/client-server/sync.yaml b/data/api/client-server/sync.yaml index e6fd7883..75288095 100644 --- a/data/api/client-server/sync.yaml +++ b/data/api/client-server/sync.yaml @@ -310,8 +310,14 @@ paths: description: |- The [stripped state events](/client-server-api/#stripped-state) that form the invite state. + + MUST also include the `m.room.member` event of the user with a membership of + `invite`, and using the same event format as joined rooms with the `event_id` + and `origin_server_ts` fields. items: - $ref: ../../event-schemas/schema/core-event-schema/stripped_state.yaml + anyOf: + - $ref: ../../event-schemas/schema/core-event-schema/stripped_state.yaml + - $ref: definitions/client_event_without_room_id.yaml type: array knock: title: Knocked rooms @@ -335,8 +341,14 @@ paths: description: |- The [stripped state events](/client-server-api/#stripped-state) that form the knock state. + + MUST also include the `m.room.member` event of the user with a membership of + `knock`, and using the same event format as joined rooms with the `event_id` and + `origin_server_ts` fields. items: - $ref: ../../event-schemas/schema/core-event-schema/stripped_state.yaml + anyOf: + - $ref: ../../event-schemas/schema/core-event-schema/stripped_state.yaml + - $ref: definitions/client_event_without_room_id.yaml type: array leave: title: Left rooms @@ -548,6 +560,8 @@ paths: "sender": "@alice:example.com", "type": "m.room.member", "state_key": "@bob:example.com", + "event_id": "$19dl9d3848dJLle:example.com", + "origin_server_ts": 1432735439654, "content": { "membership": "invite" } @@ -572,6 +586,8 @@ paths: "sender": "@bob:example.com", "type": "m.room.member", "state_key": "@bob:example.com", + "event_id": "$Fg83Kl3764di23a:example.com", + "origin_server_ts": 143273039402, "content": { "membership": "knock" } From 3c17aa37891ed0258e075e3f0a64892d367c53d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Commaille?= Date: Fri, 25 Jul 2025 10:44:39 +0200 Subject: [PATCH 2/2] Add changelog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kévin Commaille --- changelogs/client_server/newsfragments/2181.clarification | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelogs/client_server/newsfragments/2181.clarification diff --git a/changelogs/client_server/newsfragments/2181.clarification b/changelogs/client_server/newsfragments/2181.clarification new file mode 100644 index 00000000..8a0a6872 --- /dev/null +++ b/changelogs/client_server/newsfragments/2181.clarification @@ -0,0 +1,2 @@ +Clarify that the stripped state in `invite_state` and `knock_state` in `GET /sync` response must +include the full `m.room.member` event of the user.