Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion content/client-server-api/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2810,14 +2810,22 @@ fresh state can be acquired from a join.
Stripped state should contain some or all of the following state events, which
should be represented as stripped state events when possible:

* [`m.room.create`](#mroomcreate) ({{% changed-in v="1.16" %}} required on invites and knocks)
* [`m.room.create`](#mroomcreate)
* [`m.room.name`](#mroomname)
* [`m.room.avatar`](#mroomavatar)
* [`m.room.topic`](#mroomtopic)
* [`m.room.join_rules`](#mroomjoin_rules)
* [`m.room.canonical_alias`](#mroomcanonical_alias)
* [`m.room.encryption`](#mroomencryption)

{{% changed-in v="1.16" %}} The `m.room.create` event is now **required** in
the following places:
* [`invite_state`](#get_matrixclientv3sync_response-200_invited-room) and
[`knock_state`](#get_matrixclientv3sync_response-200_knocked-room) on
[`/sync`](#get_matrixclientv3sync) responses.
* When present on [`m.room.member`](#mroommember) events, the `invite_room_state`
and `knock_room_state` under `unsigned` on the event.

{{% boxes/note %}}
Clients should inspect the list of stripped state events and not assume any
particular event is present. The server might include events not described
Expand Down Expand Up @@ -2848,6 +2856,12 @@ events are not signed and could theoretically be modified, or outdated due to
updates not being sent.
{{% /boxes/warning %}}

{{% boxes/warning %}}
{{% added-in v="1.16" %}} Servers cannot pass through what they receive over
federation to clients as stripped state. Servers are expected to prune the events
into the stripped state schema below before passing the details onto clients.
{{% /boxes/warning %}}

{{% event-fields event_type="stripped_state" %}}

### Size limits
Expand Down
5 changes: 3 additions & 2 deletions data/api/server-server/invites-v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,14 @@ paths:
precise event formats.
items:
type: object
title: PDU
properties: {}
description: |-
Note that events have a different format depending on the room
version - check the [room version specification](/rooms) for
precise event formats.
example:
$ref: ./examples/stripped_state.json
$ref: ./examples/invite_or_knock_state.json
type: object
required: true
responses:
Expand Down Expand Up @@ -138,7 +139,7 @@ paths:
"origin_server_ts": 1549041175876,
"sender": "@someone:example.org",
"unsigned": {
"invite_room_state": {"$ref": "./examples/stripped_state.json"}
"invite_room_state": {"$ref": "./examples/invite_or_knock_state.json"}
},
"content": {
"membership": "invite"
Expand Down
5 changes: 3 additions & 2 deletions data/api/server-server/invites-v2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,14 @@ paths:
precise event formats.
items:
type: object
title: PDU
properties: {}
description: |-
Note that events have a different format depending on the room
version - check the [room version specification](/rooms) for
precise event formats.
example:
$ref: ./examples/stripped_state.json
$ref: ./examples/invite_or_knock_state.json
required:
- room_version
- event
Expand Down Expand Up @@ -131,7 +132,7 @@ paths:
"origin_server_ts": 1549041175876,
"sender": "@someone:example.org",
"unsigned": {
"invite_room_state": {"$ref": "./examples/stripped_state.json"}
"invite_room_state": {"$ref": "./examples/invite_or_knock_state.json"}
},
"content": {
"membership": "invite"
Expand Down
4 changes: 2 additions & 2 deletions data/api/server-server/knocks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -319,14 +319,14 @@ paths:
version - check the [room version specification](/rooms) for
precise event formats.
example:
"$ref": "./examples/stripped_state.json"
"$ref": "./examples/invite_or_knock_state.json"
required:
- knock_room_state
examples:
response:
value: {
"knock_room_state": {
"$ref": "./examples/stripped_state.json"
"$ref": "./examples/invite_or_knock_state.json"
}
}
"403":
Expand Down