aboutsummaryrefslogtreecommitdiff
path: root/cmd
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 /cmd
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 'cmd')
-rw-r--r--cmd/dendrite-demo-libp2p/main.go2
-rw-r--r--cmd/dendrite-federation-sender-server/main.go5
-rw-r--r--cmd/dendrite-monolith-server/main.go2
-rw-r--r--cmd/dendritejs/main.go2
4 files changed, 7 insertions, 4 deletions
diff --git a/cmd/dendrite-demo-libp2p/main.go b/cmd/dendrite-demo-libp2p/main.go
index b9fbfc53..a2a4675b 100644
--- a/cmd/dendrite-demo-libp2p/main.go
+++ b/cmd/dendrite-demo-libp2p/main.go
@@ -153,7 +153,7 @@ func main() {
asQuery := appservice.SetupAppServiceAPIComponent(
&base.Base, accountDB, deviceDB, federation, alias, query, transactions.New(),
)
- fsAPI := federationsender.SetupFederationSenderComponent(&base.Base, federation, query, input)
+ fsAPI := federationsender.SetupFederationSenderComponent(&base.Base, federation, query, input, &keyRing)
clientapi.SetupClientAPIComponent(
&base.Base, deviceDB, accountDB,
diff --git a/cmd/dendrite-federation-sender-server/main.go b/cmd/dendrite-federation-sender-server/main.go
index 1593afaa..f8d43b99 100644
--- a/cmd/dendrite-federation-sender-server/main.go
+++ b/cmd/dendrite-federation-sender-server/main.go
@@ -16,6 +16,7 @@ package main
import (
"github.com/matrix-org/dendrite/common/basecomponent"
+ "github.com/matrix-org/dendrite/common/keydb"
"github.com/matrix-org/dendrite/federationsender"
)
@@ -25,11 +26,13 @@ func main() {
defer base.Close() // nolint: errcheck
federation := base.CreateFederationClient()
+ keyDB := base.CreateKeyDB()
+ keyRing := keydb.CreateKeyRing(federation.Client, keyDB, cfg.Matrix.KeyPerspectives)
_, input, query := base.CreateHTTPRoomserverAPIs()
federationsender.SetupFederationSenderComponent(
- base, federation, query, input,
+ base, federation, query, input, &keyRing,
)
base.SetupAndServeHTTP(string(base.Cfg.Bind.FederationSender), string(base.Cfg.Listen.FederationSender))
diff --git a/cmd/dendrite-monolith-server/main.go b/cmd/dendrite-monolith-server/main.go
index e806f6f3..f43f8b04 100644
--- a/cmd/dendrite-monolith-server/main.go
+++ b/cmd/dendrite-monolith-server/main.go
@@ -62,7 +62,7 @@ func main() {
asQuery := appservice.SetupAppServiceAPIComponent(
base, accountDB, deviceDB, federation, alias, query, transactions.New(),
)
- fsAPI := federationsender.SetupFederationSenderComponent(base, federation, query, input)
+ fsAPI := federationsender.SetupFederationSenderComponent(base, federation, query, input, &keyRing)
input.SetFederationSenderAPI(fsAPI)
clientapi.SetupClientAPIComponent(
diff --git a/cmd/dendritejs/main.go b/cmd/dendritejs/main.go
index 7665138e..1f2f20fb 100644
--- a/cmd/dendritejs/main.go
+++ b/cmd/dendritejs/main.go
@@ -128,7 +128,7 @@ func main() {
asQuery := appservice.SetupAppServiceAPIComponent(
base, accountDB, deviceDB, federation, alias, query, transactions.New(),
)
- fedSenderAPI := federationsender.SetupFederationSenderComponent(base, federation, query, input)
+ fedSenderAPI := federationsender.SetupFederationSenderComponent(base, federation, query, input, &keyRing)
input.SetFederationSenderAPI(fedSenderAPI)
clientapi.SetupClientAPIComponent(