Describe and hoist stripped state to a first-class citizen (#3606)
* Describe and hoist stripped state to a first-class citizen Fixes https://github.com/matrix-org/matrix-doc/issues/3413 MSC: https://github.com/matrix-org/matrix-doc/pull/3173 * Add changelog * may->can for clarity * Update text per review
This commit is contained in:
parent
224773dc6a
commit
56532dd688
8 changed files with 83 additions and 36 deletions
|
@ -264,23 +264,13 @@ paths:
|
|||
title: InviteState
|
||||
type: object
|
||||
description: |-
|
||||
The state of a room that the user has been invited
|
||||
to. These state events may only have the `sender`,
|
||||
`type`, `state_key` and `content` keys
|
||||
present. These events do not replace any state that
|
||||
the client already has for the room, for example if
|
||||
the client has archived the room. Instead the
|
||||
client should keep two separate copies of the
|
||||
state: the one from the `invite_state` and one
|
||||
from the archived `state`. If the client joins
|
||||
the room then the current state will be given as a
|
||||
delta against the archived `state` not the
|
||||
`invite_state`.
|
||||
The [stripped state](#stripped-state) of a room that the user has been invited
|
||||
to.
|
||||
properties:
|
||||
events:
|
||||
description: The StrippedState events that form the invite state.
|
||||
description: The [stripped state events](#stripped-state) that form the invite state.
|
||||
items:
|
||||
$ref: "../../event-schemas/schema/stripped_state.yaml"
|
||||
$ref: "../../event-schemas/schema/core-event-schema/stripped_state.yaml"
|
||||
type: array
|
||||
knock:
|
||||
title: Knocked rooms
|
||||
|
@ -295,14 +285,12 @@ paths:
|
|||
title: KnockState
|
||||
type: object
|
||||
description: |-
|
||||
The state of a room that the user has knocked upon. The state
|
||||
events contained here have the same restrictions as `InviteState`
|
||||
above.
|
||||
The [stripped state](#stripped-state) of a room that the user has knocked upon.
|
||||
properties:
|
||||
events:
|
||||
description: The StrippedState events that form the knock state.
|
||||
description: The [stripped state events](#stripped-state) that form the knock state.
|
||||
items:
|
||||
$ref: "../../event-schemas/schema/stripped_state.yaml"
|
||||
$ref: "../../event-schemas/schema/core-event-schema/stripped_state.yaml"
|
||||
type: array
|
||||
leave:
|
||||
title: Left rooms
|
||||
|
|
|
@ -78,11 +78,10 @@ paths:
|
|||
invite_room_state:
|
||||
type: array
|
||||
description: |-
|
||||
An optional list of simplified events to help the receiver of the invite
|
||||
identify the room. The recommended events to include are the join rules,
|
||||
canonical alias, avatar, and name of the room.
|
||||
An optional list of [stripped state events](/client-server-api/#stripped-state)
|
||||
to help the receiver of the invite identify the room.
|
||||
items:
|
||||
$ref: "../../event-schemas/schema/stripped_state.yaml"
|
||||
$ref: "../../event-schemas/schema/core-event-schema/stripped_state.yaml"
|
||||
example:
|
||||
$ref: "../../event-schemas/examples/invite_room_state.json"
|
||||
example: {
|
||||
|
|
|
@ -79,11 +79,10 @@ paths:
|
|||
invite_room_state:
|
||||
type: array
|
||||
description: |-
|
||||
An optional list of simplified events to help the receiver of the invite
|
||||
identify the room. The recommended events to include are the join rules,
|
||||
canonical alias, avatar, and name of the room.
|
||||
An optional list of [stripped state events](/client-server-api/#stripped-state)
|
||||
to help the receiver of the invite identify the room.
|
||||
items:
|
||||
$ref: "../../event-schemas/schema/stripped_state.yaml"
|
||||
$ref: "../../event-schemas/schema/core-event-schema/stripped_state.yaml"
|
||||
example:
|
||||
$ref: "../../event-schemas/examples/invite_room_state.json"
|
||||
required: ['room_version', 'event']
|
||||
|
|
|
@ -285,11 +285,10 @@ paths:
|
|||
knock_room_state:
|
||||
type: array
|
||||
items:
|
||||
$ref: "../../event-schemas/schema/stripped_state.yaml"
|
||||
$ref: "../../event-schemas/schema/core-event-schema/stripped_state.yaml"
|
||||
description: |-
|
||||
A list of simplified events to help the initiator of the knock identify
|
||||
the room. The recommended events to include are the join rules, canonical
|
||||
alias, avatar, name, and encryption state of the room.
|
||||
An optional list of [stripped state events](/client-server-api/#stripped-state)
|
||||
to help the initiator of the knock identify the room.
|
||||
example:
|
||||
$ref: "../../event-schemas/examples/knock_room_state.json"
|
||||
required: ['knock_room_state']
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
# difficult because the schema would be at two different locations, with
|
||||
# different relative pathing.
|
||||
|
||||
title: StrippedState
|
||||
title: StrippedStateEvent
|
||||
type: object
|
||||
description: |-
|
||||
A stripped down state event, with only the `type`, `state_key`,
|
|
@ -19,8 +19,8 @@ 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 `StrippedState` Events. These events provide information
|
||||
on a subset of state events such as the room name.
|
||||
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
|
||||
|
@ -136,7 +136,7 @@ properties:
|
|||
state for `m.room.avatar`, `m.room.canonical_alias`, `m.room.join_rules`, and `m.room.name`
|
||||
SHOULD be included.
|
||||
items:
|
||||
$ref: "stripped_state.yaml"
|
||||
$ref: "core-event-schema/stripped_state.yaml"
|
||||
type: array
|
||||
knock_room_state:
|
||||
description: |-
|
||||
|
@ -145,7 +145,7 @@ properties:
|
|||
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: "stripped_state.yaml"
|
||||
$ref: "core-event-schema/stripped_state.yaml"
|
||||
type: array
|
||||
title: The current membership state of a user in the room.
|
||||
type: object
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue