|
2 | 2 |
|
3 | 3 | Quite a few clients and tools have a need to preview a room:
|
4 | 4 |
|
5 |
| -- A client may want to show the room in the roomlist, when showing a space. |
6 | 5 | - matrix.to may want to show avatar and name of a room.
|
7 | 6 | - Nextcloud may want to list the names and avatars of your `/joined_rooms` when
|
8 | 7 | asking where to share the media.
|
@@ -55,7 +54,7 @@ GET /_matrix/client/v1/room_summary/{roomIdOrAlias}?
|
55 | 54 | be generated locally. These can be from a matrix URI, matrix.to link or a
|
56 | 55 | `m.space.child` event for example.
|
57 | 56 |
|
58 |
| -A response includes the stripped state in the following format: |
| 57 | +A successful `200` response includes the stripped state in the following format: |
59 | 58 |
|
60 | 59 | ```json5
|
61 | 60 | {
|
@@ -115,12 +114,13 @@ calls. Restricting this API to guests only would provide no security benefit.
|
115 | 114 | This API should be accessible to guest users (as it is already accessible
|
116 | 115 | without authentication).
|
117 | 116 |
|
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 |
120 | 120 | requires authentication to preview, if the request is unauthenticated or
|
121 | 121 | authenticated by a user without access to the room.
|
122 | 122 |
|
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 |
124 | 124 | is required when called authenticated. It should be `leave` if the server
|
125 | 125 | doesn't know about the room, since for all other membership states the server
|
126 | 126 | would know about the room already.
|
@@ -201,8 +201,8 @@ calculate the room name, topic and other fields provided in this MSC.
|
201 | 201 |
|
202 | 202 | Furthermore, the membership counts in the summary field are only included, if
|
203 | 203 | 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 |
206 | 206 | events, since those are not included in the stripped state of a room. (A client
|
207 | 207 | can call `/joined_members` to receive those if needed. It may still make sense
|
208 | 208 | to include heroes so that clients could construct a human-friendly room display
|
|
0 commit comments