aboutsummaryrefslogtreecommitdiff
path: root/roomserver/roomserver.go
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-04-28 16:51:16 +0100
committerGitHub <noreply@github.com>2020-04-28 16:51:16 +0100
commita4b9edb28e32b505cf3a67bcba1acacd4a882155 (patch)
tree45210f5d40764f08c0b8c485b99826d3b27dfcf9 /roomserver/roomserver.go
parent0354836b57aa0f1e39c43961669ab1afcb757460 (diff)
Dependency inject the federation client so p2p binaries work as expected (#987)
Diffstat (limited to 'roomserver/roomserver.go')
-rw-r--r--roomserver/roomserver.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/roomserver/roomserver.go b/roomserver/roomserver.go
index ea1c5c4c..f6a373a4 100644
--- a/roomserver/roomserver.go
+++ b/roomserver/roomserver.go
@@ -35,6 +35,7 @@ import (
// APIs directly instead of having to use HTTP.
func SetupRoomServerComponent(
base *basecomponent.BaseDendrite, keyRing gomatrixserverlib.JSONVerifier,
+ fedClient *gomatrixserverlib.FederationClient,
) (api.RoomserverAliasAPI, api.RoomserverInputAPI, api.RoomserverQueryAPI) {
roomserverDB, err := storage.Open(string(base.Cfg.Database.RoomServer))
if err != nil {
@@ -53,7 +54,7 @@ func SetupRoomServerComponent(
DB: roomserverDB,
ImmutableCache: base.ImmutableCache,
ServerName: base.Cfg.Matrix.ServerName,
- FedClient: base.CreateFederationClient(),
+ FedClient: fedClient,
// TODO: We should have a key server so we don't keep adding components
// which talk to the same DB.
KeyRing: keyRing,