Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove invite_room_state, knock_room_state from the CS API. Fix examples in SS API #1273

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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.
5 changes: 0 additions & 5 deletions data/api/server-server/invites-v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down

This file was deleted.

15 changes: 0 additions & 15 deletions data/event-schemas/examples/m.room.member$knock_room_state.yaml

This file was deleted.

27 changes: 0 additions & 27 deletions data/event-schemas/schema/m.room.member.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
anoadragon453 marked this conversation as resolved.
Show resolved Hide resolved
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