options to control public room directory visibility
Signed-off-by: girlbossceo <june@girlboss.ceo>
This commit is contained in:
parent
76c00283de
commit
81e8df3102
5 changed files with 65 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue