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 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" }, 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/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" - } - } -} 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