options to control public room directory visibility
Signed-off-by: girlbossceo <june@girlboss.ceo>
This commit is contained in:
@@ -621,6 +621,13 @@ pub async fn get_public_rooms_filtered_route(
|
||||
return Err(Error::bad_config("Federation is disabled."));
|
||||
}
|
||||
|
||||
if !services()
|
||||
.globals
|
||||
.allow_public_room_directory_over_federation()
|
||||
{
|
||||
return Err(Error::bad_config("Room directory is not public."));
|
||||
}
|
||||
|
||||
let response = client_server::get_public_rooms_filtered_helper(
|
||||
None,
|
||||
body.limit,
|
||||
@@ -648,6 +655,13 @@ pub async fn get_public_rooms_route(
|
||||
return Err(Error::bad_config("Federation is disabled."));
|
||||
}
|
||||
|
||||
if !services()
|
||||
.globals
|
||||
.allow_public_room_directory_over_federation()
|
||||
{
|
||||
return Err(Error::bad_config("Room directory is not public."));
|
||||
}
|
||||
|
||||
let response = client_server::get_public_rooms_filtered_helper(
|
||||
None,
|
||||
body.limit,
|
||||
|
||||
Reference in New Issue
Block a user