Fix appservice namespace check for room aliases
Only normal users should be prevented from creating an alias within an exclusive namespace, not the appservice itself. This mirrors the behaviour in api/client_server/room.rs on room creation.
This commit is contained in:
parent
a6f4dc2b74
commit
bbdced9c90
1 changed files with 1 additions and 3 deletions
|
@ -269,9 +269,7 @@ async fn alias_checks(room_alias: &OwnedRoomAliasId, appservice_info: &Option<Re
|
|||
if !info.aliases.is_match(room_alias.as_str()) {
|
||||
return Err(Error::BadRequest(ErrorKind::Exclusive, "Room alias is not in namespace."));
|
||||
}
|
||||
}
|
||||
|
||||
if services().appservice.is_exclusive_alias(room_alias).await {
|
||||
} else if services().appservice.is_exclusive_alias(room_alias).await {
|
||||
return Err(Error::BadRequest(ErrorKind::Exclusive, "Room alias reserved by appservice."));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue