check if federation is enabled in GetRemotePdu

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-03-13 23:51:24 -04:00 committed by June
parent f1507a4522
commit 0ac2092888

View file

@ -1964,6 +1964,12 @@ impl Service {
event_id,
server,
} => {
if !services().globals.config.allow_federation {
return Ok(RoomMessageEventContent::text_plain(
"Federation is disabled on this homeserver.",
));
}
// TODO: use Futures as some requests may take a while so we dont block the
// admin room
match services()