check if federation is enabled in GetRemotePdu
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
f1507a4522
commit
0ac2092888
1 changed files with 6 additions and 0 deletions
|
@ -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()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue