You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| room_id | Required. Id of the room | Useful when the API is called with an alias. |
116
-
| avatar_url | Optional. Avatar of the room | Copied from `publicRooms`. |
117
-
| canonical_alias | Optional. The canonical alias of the room, if any. | Copied from `publicRooms`. |
118
-
| guest_can_join | Required. If guests can join the room. | Copied from `publicRooms`. |
119
-
| name | Optional. Name of the room | Copied from `publicRooms`. |
120
-
| num_joined_members | Required. Member count of the room | Copied from `publicRooms`. |
121
-
| topic | Optional. Topic of the room | Copied from `publicRooms`. |
122
-
| world_readable | Required. If the room history can be read without joining. | Copied from `publicRooms`. |
123
-
| join_rule | Optional. Join rules of the room | Copied from `publicRooms`. |
124
-
| allowed_room_ids | Optional. Room ids allows in restricted joins. | Copied from [`GET /_matrix/federation/v1/hierarchy/{roomId}`](https://spec.matrix.org/v1.13/server-server-api/#get_matrixfederationv1hierarchyroomid). Necessary to distinguish if the room can be joined or only knocked at. |
125
-
| room_type | Optional. Type of the room, if any, i.e. `m.space`| Used to distinguish rooms from spaces. |
126
-
| room_version | Optional (for historical reasons (2)). Version of the room. | Can be used by clients to show incompatibilities with a room early. |
127
-
| membership | Optional (1). The current membership of this user in the room. Usually `leave` if the room is fetched over federation. | Useful to distinguish invites and knocks from joined rooms. |
128
-
| encryption | Optional. If the room is encrypted this specified the algorithm used for this room. This is already accessible as stripped state. | Some users may only want to join encrypted rooms or clients may want to filter out encrypted rooms, if they don't support encryption or not this algorithm. |
129
-
130
-
100
+
#### Response format
131
101
132
102
If the room cannot be found, the server should return a `404`
133
103
HTTP status code along with an `M_NOT_FOUND` error code. The server should
134
104
NOT return `M_UNAUTHORIZED` or otherwise divulge existence of a room, that
135
105
requires authentication to preview, if the request is unauthenticated or
136
106
authenticated by a user without access to the room.
137
107
108
+
If the request is successful, the server returns a JSON object containing the
| canonical_alias | Optional. The canonical alias of the room, if any. |
115
+
| guest_can_join | Required. Whether guests can join the room. |
116
+
| join_rule | Optional. Join rules of the room |
117
+
| name | Optional. Name of the room |
118
+
| num_joined_members | Required. Member count of the room |
119
+
| room_id | Required. Id of the room |
120
+
| room_type | Optional. Type of the room, if any, i.e. `m.space`|
121
+
| topic | Optional. Topic of the room |
122
+
| world_readable | Required. If the room history can be read without joining. |
123
+
| allowed_room_ids | Optional. If the room is a restricted room, these are the room IDs which are specified by the join rules. Empty or omitted otherwise. |
124
+
| encryption | Optional. If the room is encrypted, this specifies the algorithm used for this room. Otherwise, omitted. |
125
+
| membership | Optional (1). The current membership of this user in the room. Usually `leave` if the server has no local users (so fetches the room over federation). |
126
+
| room_version | Optional (for historical reasons (2)). Version of the room. |
127
+
138
128
(1) The `membership` field will not be present when called unauthenticated, but
139
-
is required when called authenticated. It should be `leave` if the server
140
-
doesn't know about the room, since for all other membership states the server
141
-
would know about the room already.
129
+
is required when called authenticated.
142
130
143
131
(2) Prior to this MSC, `/_matrix/federation/v1/hierarchy/{roomId}` doesn't
144
132
return the room version, so `room_version` may be unavailable for remote
145
133
rooms.
146
134
135
+
Most of the fields above are the same as those returned by
0 commit comments