mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 07:41:23 +01:00
return M_BAD_ALIAS when trying to set non-existent canonical aliases
This is the error code named in the spec.
This commit is contained in:
parent
8537c0e8ac
commit
c748c7c188
2 changed files with 6 additions and 1 deletions
|
|
@ -220,6 +220,11 @@ This will be the first release of Grapevine since it was forked from Conduit
|
||||||
so this situation is common.
|
so this situation is common.
|
||||||
([!55](https://gitlab.computer.surgery/matrix/grapevine/-/merge_requests/55))
|
([!55](https://gitlab.computer.surgery/matrix/grapevine/-/merge_requests/55))
|
||||||
([!153](https://gitlab.computer.surgery/matrix/grapevine/-/merge_requests/153))
|
([!153](https://gitlab.computer.surgery/matrix/grapevine/-/merge_requests/153))
|
||||||
|
25. Return 400 M_BAD_ALIAS from
|
||||||
|
[PUT /_matrix/client/v3/rooms/{roomId}/state/{eventType}/{stateKey}](https://spec.matrix.org/latest/client-server-api/#put_matrixclientv3roomsroomidstateeventtypestatekey)
|
||||||
|
instead of 400 M_FORBIDDEN when trying to set a canonical alias that does
|
||||||
|
not exist.
|
||||||
|
([!158](https://gitlab.computer.surgery/matrix/grapevine/-/merge_requests/158))
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -232,7 +232,7 @@ async fn send_state_event_for_key_helper(
|
||||||
.is_none()
|
.is_none()
|
||||||
{
|
{
|
||||||
return Err(Error::BadRequest(
|
return Err(Error::BadRequest(
|
||||||
ErrorKind::forbidden(),
|
ErrorKind::BadAlias,
|
||||||
"You are only allowed to send canonical_alias events when \
|
"You are only allowed to send canonical_alias events when \
|
||||||
it's aliases already exists",
|
it's aliases already exists",
|
||||||
));
|
));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue