Skip to content

Commit 4abea9a

Browse files
clokeprichvdh
andauthored
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>
1 parent 1b69e03 commit 4abea9a

File tree

18 files changed

+492
-65
lines changed

18 files changed

+492
-65
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add room version 11 as per [MSC3820](https://github.com/matrix-org/matrix-spec-proposals/pull/3820).

content/rooms/_index.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ Alternatively, consider flipping the column/row organization to be features
3636
up top and versions on the left.
3737
-->
3838

39-
| Feature \ Version | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
40-
|-------------------|---|---|---|---|---|---|---|---|---|----|
41-
| **Knocking** |||||||||||
42-
| **Restricted join rules** |||||||||||
43-
| **`knock_restricted` join rule** |||||||||||
39+
| Feature \ Version | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
40+
|-------------------|---|---|---|---|---|---|---|---|---|----|----|
41+
| **Knocking** ||||||||||||
42+
| **Restricted join rules** ||||||||||||
43+
| **`knock_restricted` join rule** ||||||||||||
4444

4545
## Complete list of room versions
4646

@@ -57,8 +57,7 @@ the default room version when creating new rooms.
5757

5858
The available room versions are:
5959

60-
- [Version 1](/rooms/v1) - **Stable**. The current version of most
61-
rooms.
60+
- [Version 1](/rooms/v1) - **Stable**. The initial room version.
6261
- [Version 2](/rooms/v2) - **Stable**. Implements State Resolution
6362
Version 2.
6463
- [Version 3](/rooms/v3) - **Stable**. Introduces events whose IDs
@@ -76,6 +75,7 @@ The available room versions are:
7675
redacting some membership events.
7776
- [Version 10](/rooms/v10) - **Stable**. Enforces integer-only power levels
7877
and adds `knock_restricted` join rule.
78+
- [Version 11](/rooms/v11) - **Stable**. Clarifies the redaction algorithm.
7979

8080
## Room version grammar
8181

content/rooms/fragments/v1-redactions.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ not in the following list:
1919
- `membership`
2020

2121
The content object must also be stripped of all keys, unless it is one
22-
of one of the following event types:
22+
of the following event types:
2323

24-
- `m.room.member` allows key `membership`.
25-
- `m.room.create` allows key `creator`.
26-
- `m.room.join_rules` allows key `join_rule`.
27-
- `m.room.power_levels` allows keys `ban`, `events`, `events_default`,
28-
`kick`, `redact`, `state_default`, `users`, `users_default`.
29-
- `m.room.aliases` allows key `aliases`.
30-
- `m.room.history_visibility` allows key `history_visibility`.
24+
- [`m.room.member`](/client-server-api#mroommember) allows key `membership`.
25+
- [`m.room.create`](/client-server-api#mroomcreate) allows key `creator`.
26+
- [`m.room.join_rules`](/client-server-api#mroomjoin_rules) allows key `join_rule`.
27+
- [`m.room.power_levels`](/client-server-api#mroompower_levels) allows keys
28+
`ban`, `events`, `events_default`, `kick`, `redact`, `state_default`, `users`,
29+
`users_default`.
30+
- [`m.room.aliases`](/client-server-api#historical-events) allows key `aliases`.
31+
- [`m.room.history_visibility`](/client-server-api#mroomhistory_visibility) allows
32+
key `history_visibility`.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
Events in rooms of this version have the following structure:
3+
4+
{{% definition path="api/server-server/definitions/pdu_v11" %}}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
Upon receipt of a redaction event, the server must strip off any keys
3+
not in the following list:
4+
5+
- `event_id`
6+
- `type`
7+
- `room_id`
8+
- `sender`
9+
- `state_key`
10+
- `content`
11+
- `hashes`
12+
- `signatures`
13+
- `depth`
14+
- `prev_events`
15+
- `auth_events`
16+
- `origin_server_ts`
17+
18+
The content object must also be stripped of all keys, unless it is one
19+
of the following event types:
20+
21+
- [`m.room.member`](/client-server-api#mroommember) allows keys `membership`, `join_authorised_via_users_server`.
22+
Additionally, it allows the `signed` key of the `third_party_invite` key.
23+
- [`m.room.create`](/client-server-api#mroomcreate) allows all keys.
24+
- [`m.room.join_rules`](/client-server-api#mroomjoin_rules) allows keys `join_rule`, `allow`.
25+
- [`m.room.power_levels`](/client-server-api#mroompower_levels) allows keys
26+
`ban`, `events`, `events_default`, `invite`, `kick`, `redact`, `state_default`,
27+
`users`, `users_default`.
28+
- [`m.room.history_visibility`](/client-server-api#mroomhistory_visibility)
29+
allows key `history_visibility`.
30+
- [`m.room.redaction`](/client-server-api#mroomredaction) allows key `redacts`.

content/rooms/fragments/v6-redactions.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ not in the following list:
1919
- `membership`
2020

2121
The content object must also be stripped of all keys, unless it is one
22-
of one of the following event types:
22+
of the following event types:
2323

24-
- `m.room.member` allows key `membership`.
25-
- `m.room.create` allows key `creator`.
26-
- `m.room.join_rules` allows key `join_rule`.
27-
- `m.room.power_levels` allows keys `ban`, `events`, `events_default`,
28-
`kick`, `redact`, `state_default`, `users`, `users_default`.
29-
- `m.room.history_visibility` allows key `history_visibility`.
24+
- [`m.room.member`](/client-server-api#mroommember) allows key `membership`.
25+
- [`m.room.create`](/client-server-api#mroomcreate) allows key `creator`.
26+
- [`m.room.join_rules`](/client-server-api#mroomjoin_rules) allows key `join_rule`.
27+
- [`m.room.power_levels`](/client-server-api#mroompower_levels) allows keys
28+
`ban`, `events`, `events_default`, `kick`, `redact`, `state_default`, `users`,
29+
`users_default`.
30+
- [`m.room.history_visibility`](/client-server-api#mroomhistory_visibility) allows
31+
key `history_visibility`.
Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,3 @@
1-
---
2-
---
3-
4-
{{% added-in this=true %}} `m.room.member` events now keep `join_authorised_via_users_server`
5-
in addition to other keys in `content` when being redacted.
6-
7-
{{% boxes/rationale %}}
8-
Without the `join_authorised_via_users_server` property, redacted join events
9-
can become invalid when verifying the auth chain of a given event, thus creating
10-
a split-brain scenario where the user is able to speak from one server's
11-
perspective but most others will continually reject their events.
12-
13-
This can theoretically be worked around with a rejoin to the room, being careful
14-
not to use the faulty events as `prev_events`, though instead it is encouraged
15-
to use v9 rooms over v8 rooms to outright avoid the situation.
16-
17-
[Issue #3373](https://github.com/matrix-org/matrix-doc/issues/3373) has further
18-
information.
19-
{{% /boxes/rationale %}}
20-
21-
The full redaction algorithm follows.
221

232
Upon receipt of a redaction event, the server must strip off any keys
243
not in the following list:
@@ -40,11 +19,15 @@ not in the following list:
4019
- `membership`
4120

4221
The content object must also be stripped of all keys, unless it is one
43-
of one of the following event types:
44-
45-
- `m.room.member` allows keys `membership`, `join_authorised_via_users_server`.
46-
- `m.room.create` allows key `creator`.
47-
- `m.room.join_rules` allows keys `join_rule`, `allow`.
48-
- `m.room.power_levels` allows keys `ban`, `events`, `events_default`,
49-
`kick`, `redact`, `state_default`, `users`, `users_default`.
50-
- `m.room.history_visibility` allows key `history_visibility`.
22+
of the following event types:
23+
24+
- [`m.room.member`](/client-server-api#mroommember) allows keys `membership`,
25+
`join_authorised_via_users_server`.
26+
- [`m.room.create`](/client-server-api#mroomcreate) allows key `creator`.
27+
- [`m.room.join_rules`](/client-server-api#mroomjoin_rules) allows keys `join_rule`,
28+
`allow`.
29+
- [`m.room.power_levels`](/client-server-api#mroompower_levels) allows keys
30+
`ban`, `events`, `events_default`, `kick`, `redact`, `state_default`, `users`,
31+
`users_default`.
32+
- [`m.room.history_visibility`](/client-server-api#mroomhistory_visibility)
33+
allows key `history_visibility`.

0 commit comments

Comments
 (0)