mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-07-12 00:36:40 +02:00
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
4fbf22bbd2
commit
f17b6e4044
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