Match state events sent to a remote server when inviting a user

pull/2403/head
Andrew Morgan 5 years ago
parent 630f7c458c
commit fd9d57b8c4

@ -142,23 +142,19 @@ value is a mapping from room ID to room information. The room information is
a mapping from a key `knock_state` to another mapping with key `events` being a mapping from a key `knock_state` to another mapping with key `events` being
a list of `StrippedStateEvent`. `StrippedStateEvent`s are defined as state a list of `StrippedStateEvent`. `StrippedStateEvent`s are defined as state
events that only contain the `sender`, `type`, `state_key` and `content` events that only contain the `sender`, `type`, `state_key` and `content`
keys. This behaviour matches `invite_events` which already exists to provide keys.
information to the client their current room invites.
These stripped state events contain information about the room, most notably These stripped state events contain information about the room, most notably
the room's name and avatar. A client will need this information to show a the room's name and avatar. A client will need this information to show a
nice representation of pending knocked rooms. Only `m.room.name`, nice representation of pending knocked rooms. The recommended events to
`m.room.avatar`, `m.room.join_rules` and `m.room.membership` state events include are the join rules, canonical alias, avatar, and name of the room,
should be included here, rather than all room state event types. rather than all room state. This behaviour matches the information sent to
Additionally, only `m.room.membership` events of the knocking user should be remote servers when invited their users to a room.
included.
This prevents unneeded state from the room leaking out, and also speeds This prevents unneeded state from the room leaking out, and also speeds
things up (think not sending over hundreds of membership events from big things up (think not sending over hundreds of membership events from big
rooms). rooms).
XXX: Is `m.room.canonical_alias` worth allowing here for any reason?
The following is an example of knock state coming down `/sync`. The following is an example of knock state coming down `/sync`.
Request: Request:

Loading…
Cancel
Save