Skip to content

Commit 424189c

Browse files
richvdhMadLittleModsclokep
authored
Apply suggestions from code review
Co-authored-by: Eric Eastwood <madlittlemods@gmail.com> Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
1 parent 938cbc0 commit 424189c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

proposals/3266-room-summary.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
Quite a few clients and tools have a need to preview a room:
44

5-
- A client may want to show the room in the roomlist, when showing a space.
65
- matrix.to may want to show avatar and name of a room.
76
- Nextcloud may want to list the names and avatars of your `/joined_rooms` when
87
asking where to share the media.
@@ -55,7 +54,7 @@ GET /_matrix/client/v1/room_summary/{roomIdOrAlias}?
5554
be generated locally. These can be from a matrix URI, matrix.to link or a
5655
`m.space.child` event for example.
5756

58-
A response includes the stripped state in the following format:
57+
A successful `200` response includes the stripped state in the following format:
5958

6059
```json5
6160
{
@@ -115,12 +114,13 @@ calls. Restricting this API to guests only would provide no security benefit.
115114
This API should be accessible to guest users (as it is already accessible
116115
without authentication).
117116

118-
If the room can't be found, `M_NOT_FOUND` should be returned. The server should
119-
NOT return `M_UNAUTHORIZED` or otherwise divulge existance of a room, that
117+
If the room cannot be found, the server should return a `404`
118+
HTTP status code along with an `M_NOT_FOUND` error code. The server should
119+
NOT return `M_UNAUTHORIZED` or otherwise divulge existence of a room, that
120120
requires authentication to preview, if the request is unauthenticated or
121121
authenticated by a user without access to the room.
122122

123-
(1) The field `membership` will not be present when called unauthenticated, but
123+
(1) The `membership` field will not be present when called unauthenticated, but
124124
is required when called authenticated. It should be `leave` if the server
125125
doesn't know about the room, since for all other membership states the server
126126
would know about the room already.
@@ -201,8 +201,8 @@ calculate the room name, topic and other fields provided in this MSC.
201201

202202
Furthermore, the membership counts in the summary field are only included, if
203203
the client is using lazy loading. This MSC provides similar information as
204-
calling `/sync`, but it uses the stripped state, which is needed to allow this
205-
to work for unjoined rooms and it excludes `m.heroes` as well as membership
204+
calling `/sync`, but to allow it to work for unjoined rooms it only uses information
205+
from the stripped state. Additionally, it excludes `m.heroes` as well as membership
206206
events, since those are not included in the stripped state of a room. (A client
207207
can call `/joined_members` to receive those if needed. It may still make sense
208208
to include heroes so that clients could construct a human-friendly room display

0 commit comments

Comments
 (0)