use user_is_local and server_is_ours more, remove few double filters
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
e7505a4b20
commit
76c5942b4f
11 changed files with 47 additions and 50 deletions
|
@ -24,7 +24,7 @@ use ruma::{
|
|||
};
|
||||
use tracing::{error, info, warn};
|
||||
|
||||
use crate::{services, Error, Result, Ruma};
|
||||
use crate::{services, utils::server_name::server_is_ours, Error, Result, Ruma};
|
||||
|
||||
/// # `POST /_matrix/client/v3/publicRooms`
|
||||
///
|
||||
|
@ -173,7 +173,7 @@ pub(crate) async fn get_room_visibility_route(
|
|||
pub(crate) async fn get_public_rooms_filtered_helper(
|
||||
server: Option<&ServerName>, limit: Option<UInt>, since: Option<&str>, filter: &Filter, _network: &RoomNetwork,
|
||||
) -> Result<get_public_rooms_filtered::v3::Response> {
|
||||
if let Some(other_server) = server.filter(|server| *server != services().globals.server_name().as_str()) {
|
||||
if let Some(other_server) = server.filter(|server_name| !server_is_ours(server_name)) {
|
||||
let response = services()
|
||||
.sending
|
||||
.send_federation_request(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue