Skip to content

Commit 6616a5e

Browse files
committed
Accuracy per review
1 parent e68dc2f commit 6616a5e

File tree

5 files changed

+25
-47
lines changed

5 files changed

+25
-47
lines changed

content/client-server-api/modules/spaces.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,9 @@ lexicographically by Unicode code-points such that `\x20` (space) is sorted befo
114114
of their `m.space.child` event in ascending numeric order, placing them after the
115115
children with a valid `order` key in the resulting set.
116116

117-
In cases where the `order` or timestamps are the same, the children are ordered
118-
lexicographically by their room IDs (state keys) in ascending order.
117+
In cases where the `order` values are the same, the children are ordered by their
118+
timestamps. If the timestamps are the same, the children are ordered lexicographically
119+
by their room IDs (state keys) in ascending order.
119120

120121
Noting the careful use of ASCII spaces here, the following demonstrates a set of space
121122
children being ordered appropriately:
@@ -249,6 +250,6 @@ additionally contain information about rooms the requesting user is already a me
249250
of, or that the server is aware of - the local data should be used instead of the remote
250251
server's data.
251252

252-
Note that the response to this endpoint is contextual based on the user. Servers are
253+
Note that the response to the client endpoint is contextual based on the user. Servers are
253254
encouraged to cache the data for a period of time, though permission checks may need to
254255
be performed to ensure the response is accurate for that user.

data/api/server-server/space_hierarchy.yaml

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ paths:
141141
type: string
142142
description: |-
143143
If the room is a [restricted room](#restricted-rooms), these are the room IDs which
144-
are specified by the join rules. Empty otherwise.
144+
are specified by the join rules. Empty or omitted otherwise.
145145
children_state:
146146
type: array
147147
description: |-
@@ -179,33 +179,15 @@ paths:
179179
type: string
180180
description: |-
181181
If the room is a [restricted room](#restricted-rooms), these are the room IDs which
182-
are specified by the join rules. Empty otherwise.
183-
children_state:
184-
type: array
185-
description: |-
186-
The [`m.space.child`](/client-server-api/#mspacechild) events of the space-room, represented
187-
as [Stripped State Events](/client-server-api/#stripped-state) with an added
188-
`origin_server_ts` key.
189-
190-
If the room is not a space-room, this should be empty.
191-
items:
192-
allOf:
193-
- $ref: "../../event-schemas/schema/core-event-schema/stripped_state.yaml"
194-
- type: object
195-
properties:
196-
origin_server_ts:
197-
type: number
198-
format: int64
199-
description: The `origin_server_ts` for the event.
200-
required: [origin_server_ts]
182+
are specified by the join rules. Empty or omitted otherwise.
201183
required: [room_type, allowed_room_ids, children_state]
202184
inaccessible_children:
203185
type: array
204186
items:
205187
type: string
206188
description: |-
207-
The list of room IDs the responding server cannot provide details on. Rooms which the requesting
208-
server doesn't have a viable way to peek/join will be outright excluded from the response instead.
189+
The list of room IDs the requesting server doesn't have a viable way to peek/join. Rooms which
190+
the responding server cannot provide details on will be outright excluded from the response instead.
209191
210192
Assuming both the requesting and responding server are well behaved, the requesting server should
211193
consider these room IDs as not accessible from anywhere. They should not be re-requested.

data/event-schemas/schema/m.space.child.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ properties:
2727
`order` values with the wrong type, or otherwise invalid contents, are to be treated
2828
as though the `order` key was not provided.
2929
30-
Children without an `order` are sorted after children with an `order`, ordered by the
31-
timestamp of their `m.room.create` event in ascending numeric order.
30+
See [Ordering](/client-server-api/#ordering-1) for information on how the ordering works.
3231
suggested:
3332
type: boolean
3433
description: |-

proposals/1772-groups-as-rooms.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,9 @@ relationship can be expressed in one of two ways:
122122
The `order` key is a string which is used to provide a default ordering of
123123
siblings in the room list. (Rooms are sorted based on a lexicographic
124124
ordering of the Unicode codepoints of the characters in `order` values.
125-
Rooms with no `order` come last, in ascending numeric order of the
126-
`origin_server_ts` of their `m.room.create` events, or ascending
125+
Rooms with no `order` come last with no effective `order`. When the `order`
126+
(or lack thereof) is the same, the rooms are sorted in ascending numeric
127+
order of the `origin_server_ts` of their `m.room.create` events, or ascending
127128
lexicographic order of their `room_id`s in case of equal
128129
`origin_server_ts`. `order`s which are not strings, or do not consist
129130
solely of ascii characters in the range `\x20` (space) to `\x7E` (`~`), or

proposals/2946-spaces-summary.md

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,9 @@ with the addition of:
254254
event, if any.
255255
* **`allowed_room_ids`**: A list of room IDs which give access to this room per
256256
[MSC3083](https://github.com/matrix-org/matrix-doc/pull/3083).<sup id="a1">[1](#f1)</sup>
257-
* **`children_state`**: As per Client-Server API version.
257+
Optional if would be empty.
258+
* **`children_state`**: As per Client-Server API version, though only on the `room`
259+
and not `children`.
258260

259261
#### Example request:
260262

@@ -275,13 +277,14 @@ requesting server is not allowed to access the room.
275277
of "default ordering of siblings in the room list" using the `order` key:
276278
277279
> Rooms are sorted based on a lexicographic ordering of the Unicode codepoints
278-
> of the characters in `order` values. Rooms with no `order` come last, in
279-
> ascending numeric order of the `origin_server_ts` of their `m.room.create`
280-
> events, or ascending lexicographic order of their `room_id`s in case of equal
281-
> `origin_server_ts`. `order`s which are not strings, or do not consist solely
282-
> of ascii characters in the range `\x20` (space) to `\x7E` (~), or consist of
283-
> more than 50 characters, are forbidden and the field should be ignored if
284-
> received.
280+
> of the characters in `order` values. Rooms with no `order` come last with no
281+
> effective `order`. When the `order` (or lack thereof) is the same, the rooms
282+
> are sorted in ascending numeric order of the `origin_server_ts` of their
283+
> `m.room.create` events, or ascending lexicographic order of their `room_id`s
284+
> in case of equal `origin_server_ts`. `order`s which are not strings, or do
285+
> not consist solely of ascii characters in the range `\x20` (space) to `\x7E`
286+
> (`~`), or consist of more than 50 characters, are forbidden and the field
287+
> should be ignored if received.
285288
286289
Unfortunately there are situations when a homeserver comes across a reference to
287290
a child room that is unknown to it and must decide the ordering. Without being
@@ -312,16 +315,8 @@ request a space summary for Room D, but this is undesirable:
312315
* If we expand the example above to many rooms than this becomes expensive to
313316
query a remote server simply for ordering.
314317
315-
This proposes changing the ordering rules from MSC1772 to the following:
316-
317-
> Rooms are sorted based on a lexicographic ordering of the Unicode codepoints
318-
> of the characters in `order` values. Rooms with no `order` come last, in
319-
> ascending numeric order of the `origin_server_ts` of their `m.space.child`
320-
> events, or ascending lexicographic order of their `room_id`s in case of equal
321-
> `origin_server_ts`. `order`s which are not strings, or do not consist solely
322-
> of ascii characters in the range `\x20` (space) to `\x7E` (~), or consist of
323-
> more than 50 characters, are forbidden and the field should be ignored if
324-
> received.
318+
This proposes changing the ordering rules from MSC1772 to consider the `m.space.child`
319+
event instead of the `m.room.create` event.
325320
326321
This modifies the clause for calculating the order to use the `origin_server_ts`
327322
of the `m.space.child` event instead of the `m.room.create` event. This allows

0 commit comments

Comments
 (0)