mirror of
https://github.com/girlbossceo/conduwuit.git
synced 2024-11-28 05:45:48 +00: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
a6f4dc2b74
commit
bbdced9c90
|
@ -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…
Reference in a new issue