mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-29 04:32:47 +00:00
Dependency inject the federation client so p2p binaries work as expected (#987)
This commit is contained in:
parent
0354836b57
commit
a4b9edb28e
5 changed files with 6 additions and 5 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue