From 0fe15e17f79cde7d14a92062fe04b9aafbfabf27 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Wed, 5 Oct 2022 13:57:02 +0100 Subject: [PATCH 1/4] Remove 'invite_room_state' from the CS API --- .../m.room.member$invite_room_state.yaml | 15 ----------- data/event-schemas/schema/m.room.member.yaml | 27 ------------------- 2 files changed, 42 deletions(-) delete mode 100644 data/event-schemas/examples/m.room.member$invite_room_state.yaml diff --git a/data/event-schemas/examples/m.room.member$invite_room_state.yaml b/data/event-schemas/examples/m.room.member$invite_room_state.yaml deleted file mode 100644 index 38a4951ce..000000000 --- a/data/event-schemas/examples/m.room.member$invite_room_state.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$ref": "m.room.member.yaml", - "content": { - "membership": "invite", - "avatar_url": "mxc://example.org/SEsfnsuifSDFSSEF", - "displayname": "Alice Margatroid", - "reason": "Looking for support" - }, - "unsigned": { - "age": 1234, - "invite_room_state": { - "$ref": "invite_room_state.json" - } - } -} diff --git a/data/event-schemas/schema/m.room.member.yaml b/data/event-schemas/schema/m.room.member.yaml index bf2f7145e..c3c536634 100644 --- a/data/event-schemas/schema/m.room.member.yaml +++ b/data/event-schemas/schema/m.room.member.yaml @@ -18,10 +18,6 @@ description: |- The `third_party_invite` property will be set if this invite is an `invite` event and is the successor of an `m.room.third_party_invite` event, and absent otherwise. - This event may also include an `invite_room_state` key inside the event's `unsigned` data. - If present, this contains an array of [stripped state events](/client-server-api/#stripped-state) - to assist the receiver in identifying the room. - The user for which a membership applies is represented by the `state_key`. Under some conditions, the `sender` and `state_key` may not match - this may be interpreted as the `sender` affecting the membership state of the `state_key` user. @@ -136,28 +132,5 @@ properties: allOf: - $ref: "core-event-schema/unsigned_prop.yaml" - type: object - properties: - invite_room_state: - description: |- - A subset of the state of the room at the time of the invite, if `membership` is `invite`. - Note that this state is informational, and SHOULD NOT be trusted; once the client has - joined the room, it SHOULD fetch the live state from the server and discard the - invite_room_state. Also, clients must not rely on any particular state being present here; - they SHOULD behave properly (with possibly a degraded but not a broken experience) in - the absence of any particular events here. If they are set on the room, at least the - state for `m.room.avatar`, `m.room.canonical_alias`, `m.room.join_rules`, and `m.room.name` - SHOULD be included. - items: - $ref: "core-event-schema/stripped_state.yaml" - type: array - knock_room_state: - description: |- - A subset of the state of the room at the time of the knock, if `membership` is `knock`. - This has the same restrictions as `invite_room_state`. If they are set on the room, at least - the state for `m.room.avatar`, `m.room.canonical_alias`, `m.room.join_rules`, `m.room.name`, - and `m.room.encryption` SHOULD be included. - items: - $ref: "core-event-schema/stripped_state.yaml" - type: array title: The current membership state of a user in the room. type: object From f6d6f1bcb78a4590a3af51a4b37b800fbaabfda7 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Wed, 5 Oct 2022 13:58:17 +0100 Subject: [PATCH 2/4] Remove 'unsigned.invite_room_state' from the fed invite v2 This is undocumented other than in the example. Synapse accidentally returns this, which I assume is the reason it ended up in an example. --- data/api/server-server/invites-v2.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/data/api/server-server/invites-v2.yaml b/data/api/server-server/invites-v2.yaml index b8b66f130..d560ec5a8 100644 --- a/data/api/server-server/invites-v2.yaml +++ b/data/api/server-server/invites-v2.yaml @@ -128,11 +128,6 @@ paths: "origin": "example.org", "origin_server_ts": 1549041175876, "sender": "@someone:example.org", - "unsigned": { - "invite_room_state": { - "$ref": "../../event-schemas/examples/invite_room_state.json" - } - }, "content": { "membership": "invite" }, From d1707d018073be0697dba067ddf1a11906d03cbe Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Wed, 5 Oct 2022 14:19:09 +0100 Subject: [PATCH 3/4] Remove 'knock_room_state' from the CS API --- .../examples/m.room.member$knock_room_state.yaml | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 data/event-schemas/examples/m.room.member$knock_room_state.yaml diff --git a/data/event-schemas/examples/m.room.member$knock_room_state.yaml b/data/event-schemas/examples/m.room.member$knock_room_state.yaml deleted file mode 100644 index c1ec3a321..000000000 --- a/data/event-schemas/examples/m.room.member$knock_room_state.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$ref": "m.room.member.yaml", - "content": { - "membership": "knock", - "avatar_url": "mxc://example.org/SEsfnsuifSDFSSEF", - "displayname": "Alice Margatroid", - "reason": "Looking for support" - }, - "unsigned": { - "age": 1234, - "knock_room_state": { - "$ref": "knock_room_state.json" - } - } -} From 07176601432013603ca3f45165aff33e104b2de5 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Wed, 5 Oct 2022 17:08:16 +0100 Subject: [PATCH 4/4] Changelogs --- changelogs/client_server/newsfragments/1273.clarification | 1 + changelogs/server_server/newsfragments/1273.clarification | 1 + 2 files changed, 2 insertions(+) create mode 100644 changelogs/client_server/newsfragments/1273.clarification create mode 100644 changelogs/server_server/newsfragments/1273.clarification diff --git a/changelogs/client_server/newsfragments/1273.clarification b/changelogs/client_server/newsfragments/1273.clarification new file mode 100644 index 000000000..5c6ee4f2d --- /dev/null +++ b/changelogs/client_server/newsfragments/1273.clarification @@ -0,0 +1 @@ +Remove references to `unsigned.{invite_room_state,knock_room_state}` in `m.room.member` events. Clients should use [`invite_state`](https://spec.matrix.org/v1.4/client-server-api/#_matrixclientv3sync_invitestate) to retrieve stripped state events from rooms they've been invited to or knocked on. \ No newline at end of file diff --git a/changelogs/server_server/newsfragments/1273.clarification b/changelogs/server_server/newsfragments/1273.clarification new file mode 100644 index 000000000..0f6ae7386 --- /dev/null +++ b/changelogs/server_server/newsfragments/1273.clarification @@ -0,0 +1 @@ +Remove superfluous `unsigned.invite_room_state` dictionary in the [`PUT /_matrix/federation/v2/invite/{roomId}/{eventId}`](https://spec.matrix.org/v1.4/server-server-api/#put_matrixfederationv2inviteroomideventid) response example. \ No newline at end of file