| state_key | string | **Required.** A unique key which defines the overwriting semantics for this piece of room state. This value is often a zero-length string. The presence of this key makes this event a State Event. State keys starting with an `@` are reserved for referencing user IDs, such as room members. With the exception of a few events, state events set with a given user's ID as the state key MUST only be set by that user. |
| state_key | string | **Required.** A unique key which defines the overwriting semantics for this piece of room state. This value is often a zero-length string. The presence of this key makes this event a State Event. State keys starting with an `@` are reserved for referencing user IDs, such as room members. With the exception of a few events, state events set with a given user's ID as the state key MUST only be set by that user. |
### Stripped state
Stripped state events are simplified state events to help a potential
joiner identify the room. These state events can only have the `sender`,
`type`, `state_key` and `content` keys present.
These stripped state events typically appear on invites, knocks, and in
other places where a user *could* join the room under the conditions
available (such as a [`restricted` room](#restricted-rooms)).
Clients should only use stripped state events so long as they don't have
access to the proper state of the room. Once the state of the room is
available, all stripped state should be discarded. In cases where the
client has an archived state of the room (such as after being kicked)
and the client is receiving stripped state for the room, such as from an
invite or knock, then the stripped state should take precedence until
fresh state can be acquired from a join.
The following state events should be represented as stripped state when
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.
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.
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
If present, this contains an array of [stripped state events](/client-server-api/#stripped-state)
ona subset of state events such as the room name.
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 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 `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`
state for `m.room.avatar`, `m.room.canonical_alias`, `m.room.join_rules`, and `m.room.name`
SHOULD be included.
SHOULD be included.
items:
items:
$ref:"stripped_state.yaml"
$ref:"core-event-schema/stripped_state.yaml"
type:array
type:array
knock_room_state:
knock_room_state:
description:|-
description:|-
@ -145,7 +145,7 @@ properties:
the state for `m.room.avatar`, `m.room.canonical_alias`, `m.room.join_rules`, `m.room.name`,
the state for `m.room.avatar`, `m.room.canonical_alias`, `m.room.join_rules`, `m.room.name`,
and `m.room.encryption` SHOULD be included.
and `m.room.encryption` SHOULD be included.
items:
items:
$ref:"stripped_state.yaml"
$ref:"core-event-schema/stripped_state.yaml"
type:array
type:array
title:The current membership state of a user in the room.
title:The current membership state of a user in the room.