check if federation is enabled in GetRemotePdu
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
@@ -1964,6 +1964,12 @@ impl Service {
|
|||||||
event_id,
|
event_id,
|
||||||
server,
|
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
|
// TODO: use Futures as some requests may take a while so we dont block the
|
||||||
// admin room
|
// admin room
|
||||||
match services()
|
match services()
|
||||||
|
|||||||
Reference in New Issue
Block a user