Add room version 11 (#1604)

* Remove duplicate words.

* Add information on room version 11.

* Note some event changes.

* Newsfragment

* Fix-up event schema.

* Apply suggestions from code review

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Fix 'new in this version'.

* Clarify creator field.

* Fix-up event format & examples.

* Move the Redactions section to the client section.

* Reference the sender instead of the creator.

* More links

* Even more links.

* Fix order of headers.

* Fix typos.

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Clarify description of creator.

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Clean-up intro paragraphs for redactions.

* Clean-up examples and language.

* Review comments.

* FIx-up markup tags.

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This commit is contained in:
Patrick Cloke 2023-08-15 02:18:45 -04:00 committed by GitHub
parent 1b69e03793
commit 4abea9a6ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 491 additions and 64 deletions

View file

@ -19,12 +19,14 @@ not in the following list:
- `membership`
The content object must also be stripped of all keys, unless it is one
of one of the following event types:
of the following event types:
- `m.room.member` allows key `membership`.
- `m.room.create` allows key `creator`.
- `m.room.join_rules` allows key `join_rule`.
- `m.room.power_levels` allows keys `ban`, `events`, `events_default`,
`kick`, `redact`, `state_default`, `users`, `users_default`.
- `m.room.aliases` allows key `aliases`.
- `m.room.history_visibility` allows key `history_visibility`.
- [`m.room.member`](/client-server-api#mroommember) allows key `membership`.
- [`m.room.create`](/client-server-api#mroomcreate) allows key `creator`.
- [`m.room.join_rules`](/client-server-api#mroomjoin_rules) allows key `join_rule`.
- [`m.room.power_levels`](/client-server-api#mroompower_levels) allows keys
`ban`, `events`, `events_default`, `kick`, `redact`, `state_default`, `users`,
`users_default`.
- [`m.room.aliases`](/client-server-api#historical-events) allows key `aliases`.
- [`m.room.history_visibility`](/client-server-api#mroomhistory_visibility) allows
key `history_visibility`.

View file

@ -0,0 +1,4 @@
Events in rooms of this version have the following structure:
{{% definition path="api/server-server/definitions/pdu_v11" %}}

View file

@ -0,0 +1,30 @@
Upon receipt of a redaction event, the server must strip off any keys
not in the following list:
- `event_id`
- `type`
- `room_id`
- `sender`
- `state_key`
- `content`
- `hashes`
- `signatures`
- `depth`
- `prev_events`
- `auth_events`
- `origin_server_ts`
The content object must also be stripped of all keys, unless it is one
of the following event types:
- [`m.room.member`](/client-server-api#mroommember) allows keys `membership`, `join_authorised_via_users_server`.
Additionally, it allows the `signed` key of the `third_party_invite` key.
- [`m.room.create`](/client-server-api#mroomcreate) allows all keys.
- [`m.room.join_rules`](/client-server-api#mroomjoin_rules) allows keys `join_rule`, `allow`.
- [`m.room.power_levels`](/client-server-api#mroompower_levels) allows keys
`ban`, `events`, `events_default`, `invite`, `kick`, `redact`, `state_default`,
`users`, `users_default`.
- [`m.room.history_visibility`](/client-server-api#mroomhistory_visibility)
allows key `history_visibility`.
- [`m.room.redaction`](/client-server-api#mroomredaction) allows key `redacts`.

View file

@ -19,11 +19,13 @@ not in the following list:
- `membership`
The content object must also be stripped of all keys, unless it is one
of one of the following event types:
of the following event types:
- `m.room.member` allows key `membership`.
- `m.room.create` allows key `creator`.
- `m.room.join_rules` allows key `join_rule`.
- `m.room.power_levels` allows keys `ban`, `events`, `events_default`,
`kick`, `redact`, `state_default`, `users`, `users_default`.
- `m.room.history_visibility` allows key `history_visibility`.
- [`m.room.member`](/client-server-api#mroommember) allows key `membership`.
- [`m.room.create`](/client-server-api#mroomcreate) allows key `creator`.
- [`m.room.join_rules`](/client-server-api#mroomjoin_rules) allows key `join_rule`.
- [`m.room.power_levels`](/client-server-api#mroompower_levels) allows keys
`ban`, `events`, `events_default`, `kick`, `redact`, `state_default`, `users`,
`users_default`.
- [`m.room.history_visibility`](/client-server-api#mroomhistory_visibility) allows
key `history_visibility`.

View file

@ -1,24 +1,3 @@
---
---
{{% added-in this=true %}} `m.room.member` events now keep `join_authorised_via_users_server`
in addition to other keys in `content` when being redacted.
{{% boxes/rationale %}}
Without the `join_authorised_via_users_server` property, redacted join events
can become invalid when verifying the auth chain of a given event, thus creating
a split-brain scenario where the user is able to speak from one server's
perspective but most others will continually reject their events.
This can theoretically be worked around with a rejoin to the room, being careful
not to use the faulty events as `prev_events`, though instead it is encouraged
to use v9 rooms over v8 rooms to outright avoid the situation.
[Issue #3373](https://github.com/matrix-org/matrix-doc/issues/3373) has further
information.
{{% /boxes/rationale %}}
The full redaction algorithm follows.
Upon receipt of a redaction event, the server must strip off any keys
not in the following list:
@ -40,11 +19,15 @@ not in the following list:
- `membership`
The content object must also be stripped of all keys, unless it is one
of one of the following event types:
of the following event types:
- `m.room.member` allows keys `membership`, `join_authorised_via_users_server`.
- `m.room.create` allows key `creator`.
- `m.room.join_rules` allows keys `join_rule`, `allow`.
- `m.room.power_levels` allows keys `ban`, `events`, `events_default`,
`kick`, `redact`, `state_default`, `users`, `users_default`.
- `m.room.history_visibility` allows key `history_visibility`.
- [`m.room.member`](/client-server-api#mroommember) allows keys `membership`,
`join_authorised_via_users_server`.
- [`m.room.create`](/client-server-api#mroomcreate) allows key `creator`.
- [`m.room.join_rules`](/client-server-api#mroomjoin_rules) allows keys `join_rule`,
`allow`.
- [`m.room.power_levels`](/client-server-api#mroompower_levels) allows keys
`ban`, `events`, `events_default`, `kick`, `redact`, `state_default`, `users`,
`users_default`.
- [`m.room.history_visibility`](/client-server-api#mroomhistory_visibility)
allows key `history_visibility`.