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
summary: Create a new mapping from room alias to room ID.
33
33
operationId: setRoomAlias
@@ -129,7 +129,16 @@ paths:
129
129
description: |-
130
130
Remove a mapping of room alias to room ID.
131
131
132
-
Servers may choose to implement additional access control checks here, for instance that room aliases can only be deleted by their creator or a server administrator.
132
+
Servers may choose to implement additional access control checks here, for instance that
133
+
room aliases can only be deleted by their creator or a server administrator.
134
+
135
+
.. Note::
136
+
Servers may choose to update the ``alt_aliases`` for the ``m.room.canonical_alias``
137
+
state event in the room when an alias is removed. Servers which choose to update the
138
+
canonical alias event are recommended to, in addition to their other relevant permission
139
+
checks, delete the alias and return a successful response even if the user does not
140
+
have permission to update the ``m.room.canonical_alias`` event.
141
+
133
142
operationId: deleteRoomAlias
134
143
security:
135
144
- accessToken: []
@@ -159,3 +168,70 @@ paths:
159
168
"$ref": "definitions/errors/error.yaml"
160
169
tags:
161
170
- Room directory
171
+
"/rooms/{roomId}/aliases":
172
+
get:
173
+
summary: Get a list of local aliases on a given room.
174
+
description: |-
175
+
Get a list of aliases maintained by the local server for the
176
+
given room.
177
+
178
+
This endpoint can be called by users who are in the room (external
179
+
users receive an ``M_FORBIDDEN`` error response). If the room's
180
+
``m.room.history_visibility`` maps to ``world_readable``, any
181
+
user can call this endpoint.
182
+
183
+
Servers may choose to implement additional access control checks here,
184
+
such as allowing server administrators to view aliases regardless of
185
+
membership.
186
+
187
+
.. Note::
188
+
Clients are recommended not to display this list of aliases prominently
189
+
as they are not curated, unlike those listed in the ``m.room.canonical_alias``
190
+
state event.
191
+
192
+
operationId: getLocalAliases
193
+
security:
194
+
- accessToken: []
195
+
parameters:
196
+
- in: path
197
+
type: string
198
+
name: roomId
199
+
description: The room ID to find local aliases of.
200
+
required: true
201
+
x-example: "!abc123:example.org"
202
+
responses:
203
+
200:
204
+
description: |-
205
+
The list of local aliases for the room.
206
+
examples:
207
+
application/json: {
208
+
"aliases": [
209
+
"#somewhere:example.com",
210
+
"#another:example.com",
211
+
"#hat_trick:example.com"
212
+
]
213
+
}
214
+
schema:
215
+
type: object
216
+
properties:
217
+
aliases:
218
+
type: array
219
+
description: The server's local aliases on the room. Can be empty.
220
+
items:
221
+
type: string
222
+
required: ['aliases']
223
+
403:
224
+
description: The user is not permitted to retrieve the list of local aliases for the room.
0 commit comments