aboutsummaryrefslogtreecommitdiff
path: root/federationsender/federationsender.go
diff options
context:
space:
mode:
Diffstat (limited to 'federationsender/federationsender.go')
-rw-r--r--federationsender/federationsender.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/federationsender/federationsender.go b/federationsender/federationsender.go
index 355775f8..aa9a7bc9 100644
--- a/federationsender/federationsender.go
+++ b/federationsender/federationsender.go
@@ -36,6 +36,7 @@ func SetupFederationSenderComponent(
federation *gomatrixserverlib.FederationClient,
rsQueryAPI roomserverAPI.RoomserverQueryAPI,
rsInputAPI roomserverAPI.RoomserverInputAPI,
+ keyRing *gomatrixserverlib.KeyRing,
) api.FederationSenderInternalAPI {
federationSenderDB, err := storage.NewDatabase(string(base.Cfg.Database.FederationSender))
if err != nil {
@@ -61,10 +62,10 @@ func SetupFederationSenderComponent(
logrus.WithError(err).Panic("failed to start typing server consumer")
}
- queryAPI := query.FederationSenderInternalAPI{
- DB: federationSenderDB,
- }
+ queryAPI := query.NewFederationSenderInternalAPI(
+ federationSenderDB, base.Cfg, roomserverProducer, federation, keyRing,
+ )
queryAPI.SetupHTTP(http.DefaultServeMux)
- return &queryAPI
+ return queryAPI
}