aboutsummaryrefslogtreecommitdiff
path: root/federationsender/federationsender.go
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2020-04-29 15:29:39 +0100
committerGitHub <noreply@github.com>2020-04-29 15:29:39 +0100
commit64e94e9a6f0a138e7fe771f540b57988bc344b59 (patch)
tree9ef06d96a4c5f0bd59ea55dad8d7f74646898894 /federationsender/federationsender.go
parenta308e61331f549ae0964f83dff88abc282033ed3 (diff)
Join room support in federation sender (#989)
* Implement PerformJoinRequest * Rename perform functions * Check send join response * Temporary wiring to test federation sender room joins * Actually pass through the config * Make sure membership content shows join
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
}