Skip to content

Commit 7917d08

Browse files
committed
clarifications
1 parent 4e123ca commit 7917d08

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

proposals/2432-revised-alias-publishing.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,16 @@ rules](https://matrix.org/docs/spec/rooms/v1#authorization-rules) and
9696
(Note: Synapse currently implements this check on the main alias, though
9797
this is unspecced.)
9898

99-
(TODO: what error code should be returned if the alias is invalid, or if it
100-
points to the wrong room?)
99+
The following error codes are specified:
100+
101+
* HTTP 400, with `errcode: M_INVALID_PARAMETER` if an attempt is made to add
102+
an entry which is not a well-formed alias (examples: too long, doesn't
103+
start with `#`, doesn't contain a `:`).
104+
105+
* HTTP 400, with `errcode: M_BAD_ALIAS` if an added alias does not point at
106+
the given room (either because the alias doesn't exist, because it can't
107+
be resolved due to an unreachable server, or because the alias points at a
108+
different room).
101109

102110
* Currently, [`PUT /_matrix/client/r0/directory/room/{roomAlias}`](https://matrix.org/docs/spec/client_server/r0.6.0#put-matrix-client-r0-directory-room-roomalias)
103111
attempts to send updated `m.room.aliases` events on the caller's
@@ -110,8 +118,14 @@ rules](https://matrix.org/docs/spec/rooms/v1#authorization-rules) and
110118
deleted. (Again, this is implemented in Synapse but does not appear to be
111119
explicitly specced.) The `m.room.aliases` functionality should be removed,
112120
and the `m.room.canonical_alias` functionality should be extended to cover
113-
`alt_aliases`. As today, no error occurs if the caller does not have
114-
permission to send such an event.
121+
`alt_aliases`.
122+
123+
The behaviour if the calling user has permission to delete the alias but
124+
does not have permission to send `m.room.canonical_alias` events in the room
125+
(for example, by virtue of being a "server administrator", or by being the
126+
user that created the alias) is implementation-defined. It is *recommended*
127+
that in this case, the alias is deleted anyway, and a successful response is
128+
returned to the client.
115129

116130
* A new api endpoint, `GET /_matrix/client/r0/rooms/{roomId}/aliases` is
117131
added, which returns the list of aliases currently defined on the local

0 commit comments

Comments
 (0)