Remove dead code

These check the origin which is already checked in router auth
This commit is contained in:
dasha_uwu
2026-01-16 22:12:20 +05:00
committed by Jason Volk
parent 2f4d3c2851
commit 3a9446bb9c
5 changed files with 2 additions and 84 deletions

View File

@@ -21,7 +21,6 @@ use tuwunel_core::{
matrix::{Event, PduCount, PduEvent, event::gen_event_id},
utils,
utils::hash::sha256,
warn,
};
use crate::Ruma;
@@ -60,20 +59,6 @@ pub(crate) async fn create_invite_route(
return Err!(Request(Forbidden("Server is banned on this homeserver.")));
}
if services
.config
.forbidden_remote_server_names
.is_match(body.origin().host())
{
warn!(
"Received federated/remote invite from banned server {} for room ID {}. Rejecting.",
body.origin(),
body.room_id
);
return Err!(Request(Forbidden("Server is banned on this homeserver.")));
}
let mut signed_event = utils::to_canonical_object(&body.event)
.map_err(|_| err!(Request(InvalidParam("Invite event is invalid."))))?;