aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/dendrite-demo-libp2p/main.go2
-rw-r--r--cmd/dendrite-monolith-server/main.go2
-rw-r--r--cmd/dendrite-room-server/main.go2
-rw-r--r--cmd/dendritejs/main.go2
-rw-r--r--roomserver/roomserver.go3
5 files changed, 6 insertions, 5 deletions
diff --git a/cmd/dendrite-demo-libp2p/main.go b/cmd/dendrite-demo-libp2p/main.go
index f1d18d0e..66d103ea 100644
--- a/cmd/dendrite-demo-libp2p/main.go
+++ b/cmd/dendrite-demo-libp2p/main.go
@@ -148,7 +148,7 @@ func main() {
federation := createFederationClient(base)
keyRing := keydb.CreateKeyRing(federation.Client, keyDB, cfg.Matrix.KeyPerspectives)
- alias, input, query := roomserver.SetupRoomServerComponent(&base.Base, keyRing)
+ alias, input, query := roomserver.SetupRoomServerComponent(&base.Base, keyRing, federation)
eduInputAPI := eduserver.SetupEDUServerComponent(&base.Base, cache.New())
asQuery := appservice.SetupAppServiceAPIComponent(
&base.Base, accountDB, deviceDB, federation, alias, query, transactions.New(),
diff --git a/cmd/dendrite-monolith-server/main.go b/cmd/dendrite-monolith-server/main.go
index 8cfb7566..f3e720a8 100644
--- a/cmd/dendrite-monolith-server/main.go
+++ b/cmd/dendrite-monolith-server/main.go
@@ -57,7 +57,7 @@ func main() {
federation := base.CreateFederationClient()
keyRing := keydb.CreateKeyRing(federation.Client, keyDB, cfg.Matrix.KeyPerspectives)
- alias, input, query := roomserver.SetupRoomServerComponent(base, keyRing)
+ alias, input, query := roomserver.SetupRoomServerComponent(base, keyRing, federation)
eduInputAPI := eduserver.SetupEDUServerComponent(base, cache.New())
asQuery := appservice.SetupAppServiceAPIComponent(
base, accountDB, deviceDB, federation, alias, query, transactions.New(),
diff --git a/cmd/dendrite-room-server/main.go b/cmd/dendrite-room-server/main.go
index f33a2b88..98410452 100644
--- a/cmd/dendrite-room-server/main.go
+++ b/cmd/dendrite-room-server/main.go
@@ -30,7 +30,7 @@ func main() {
federation := base.CreateFederationClient()
keyRing := keydb.CreateKeyRing(federation.Client, keyDB, cfg.Matrix.KeyPerspectives)
- roomserver.SetupRoomServerComponent(base, keyRing)
+ roomserver.SetupRoomServerComponent(base, keyRing, federation)
base.SetupAndServeHTTP(string(base.Cfg.Bind.RoomServer), string(base.Cfg.Listen.RoomServer))
diff --git a/cmd/dendritejs/main.go b/cmd/dendritejs/main.go
index 23d4327d..6300d249 100644
--- a/cmd/dendritejs/main.go
+++ b/cmd/dendritejs/main.go
@@ -123,7 +123,7 @@ func main() {
}
p2pPublicRoomProvider := NewLibP2PPublicRoomsProvider(node)
- alias, input, query := roomserver.SetupRoomServerComponent(base, keyRing)
+ alias, input, query := roomserver.SetupRoomServerComponent(base, keyRing, federation)
eduInputAPI := eduserver.SetupEDUServerComponent(base, cache.New())
asQuery := appservice.SetupAppServiceAPIComponent(
base, accountDB, deviceDB, federation, alias, query, transactions.New(),
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,