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
This commit is contained in:
Neil Alexander 2020-04-29 15:29:39 +01:00 committed by GitHub
parent a308e61331
commit 64e94e9a6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 265 additions and 135 deletions

View file

@ -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,

View file

@ -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))

View file

@ -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(

View file

@ -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(