aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2021-12-13 13:24:49 +0000
committerNeil Alexander <neilalexander@users.noreply.github.com>2021-12-13 13:24:49 +0000
commit3113210f17221240397796d90879c50b1581316a (patch)
tree68cf1bd630b2b40783025ff43cc9718e25a1d3d9 /cmd
parentc3dda0779d5cc176ae6c2213f5321f876fa22a99 (diff)
Fix keyring regressions in previous P2P demo
Diffstat (limited to 'cmd')
-rw-r--r--cmd/dendrite-demo-libp2p/main.go4
-rw-r--r--cmd/dendrite-demo-pinecone/main.go5
-rw-r--r--cmd/dendrite-demo-yggdrasil/main.go5
-rw-r--r--cmd/dendrite-monolith-server/main.go6
-rw-r--r--cmd/dendrite-polylith-multi/personalities/federationapi.go2
-rw-r--r--cmd/dendrite-polylith-multi/personalities/roomserver.go2
-rw-r--r--cmd/dendritejs-pinecone/main.go3
-rw-r--r--cmd/dendritejs/main.go3
8 files changed, 13 insertions, 17 deletions
diff --git a/cmd/dendrite-demo-libp2p/main.go b/cmd/dendrite-demo-libp2p/main.go
index d518d158..5f26e00c 100644
--- a/cmd/dendrite-demo-libp2p/main.go
+++ b/cmd/dendrite-demo-libp2p/main.go
@@ -158,10 +158,10 @@ func main() {
asAPI := appservice.NewInternalAPI(&base.Base, userAPI, rsAPI)
rsAPI.SetAppserviceAPI(asAPI)
fsAPI := federationapi.NewInternalAPI(
- &base.Base, federation, rsAPI, base.Base.Caches, true,
+ &base.Base, federation, rsAPI, base.Base.Caches, nil, true,
)
keyRing := fsAPI.KeyRing()
- rsAPI.SetFederationAPI(fsAPI)
+ rsAPI.SetFederationAPI(fsAPI, keyRing)
provider := newPublicRoomsProvider(base.LibP2PPubsub, rsAPI)
err = provider.Start()
if err != nil {
diff --git a/cmd/dendrite-demo-pinecone/main.go b/cmd/dendrite-demo-pinecone/main.go
index cc7238ea..180f8ae0 100644
--- a/cmd/dendrite-demo-pinecone/main.go
+++ b/cmd/dendrite-demo-pinecone/main.go
@@ -185,7 +185,7 @@ func main() {
rsComponent := roomserver.NewInternalAPI(base)
rsAPI := rsComponent
fsAPI := federationapi.NewInternalAPI(
- base, federation, rsAPI, base.Caches, true,
+ base, federation, rsAPI, base.Caches, keyRing, true,
)
keyAPI := keyserver.NewInternalAPI(base, &base.Cfg.KeyServer, fsAPI)
@@ -198,8 +198,7 @@ func main() {
asAPI := appservice.NewInternalAPI(base, userAPI, rsAPI)
- rsComponent.SetFederationAPI(fsAPI)
- rsComponent.SetKeyring(keyRing)
+ rsComponent.SetFederationAPI(fsAPI, keyRing)
monolith := setup.Monolith{
Config: base.Cfg,
diff --git a/cmd/dendrite-demo-yggdrasil/main.go b/cmd/dendrite-demo-yggdrasil/main.go
index 1e0a7d03..b8ac3f72 100644
--- a/cmd/dendrite-demo-yggdrasil/main.go
+++ b/cmd/dendrite-demo-yggdrasil/main.go
@@ -118,11 +118,10 @@ func main() {
asAPI := appservice.NewInternalAPI(base, userAPI, rsAPI)
rsAPI.SetAppserviceAPI(asAPI)
fsAPI := federationapi.NewInternalAPI(
- base, federation, rsAPI, base.Caches, true,
+ base, federation, rsAPI, base.Caches, keyRing, true,
)
- rsComponent.SetFederationAPI(fsAPI)
- rsComponent.SetKeyring(keyRing)
+ rsComponent.SetFederationAPI(fsAPI, keyRing)
monolith := setup.Monolith{
Config: base.Cfg,
diff --git a/cmd/dendrite-monolith-server/main.go b/cmd/dendrite-monolith-server/main.go
index 1f85cae9..08851734 100644
--- a/cmd/dendrite-monolith-server/main.go
+++ b/cmd/dendrite-monolith-server/main.go
@@ -91,7 +91,7 @@ func main() {
}
fsAPI := federationapi.NewInternalAPI(
- base, federation, rsAPI, base.Caches, false,
+ base, federation, rsAPI, base.Caches, nil, false,
)
if base.UseHTTPAPIs {
federationapi.AddInternalRoutes(base.InternalAPIMux, fsAPI)
@@ -101,7 +101,7 @@ func main() {
// The underlying roomserver implementation needs to be able to call the fedsender.
// This is different to rsAPI which can be the http client which doesn't need this dependency
- rsImpl.SetFederationAPI(fsAPI)
+ rsImpl.SetFederationAPI(fsAPI, keyRing)
keyImpl := keyserver.NewInternalAPI(base, &base.Cfg.KeyServer, fsAPI)
keyAPI := keyImpl
@@ -134,7 +134,7 @@ func main() {
// The underlying roomserver implementation needs to be able to call the fedsender.
// This is different to rsAPI which can be the http client which doesn't need this
// dependency. Other components also need updating after their dependencies are up.
- rsImpl.SetFederationAPI(fsAPI)
+ rsImpl.SetFederationAPI(fsAPI, keyRing)
rsImpl.SetAppserviceAPI(asAPI)
keyImpl.SetUserAPI(userAPI)
diff --git a/cmd/dendrite-polylith-multi/personalities/federationapi.go b/cmd/dendrite-polylith-multi/personalities/federationapi.go
index 5f87f96b..c5097379 100644
--- a/cmd/dendrite-polylith-multi/personalities/federationapi.go
+++ b/cmd/dendrite-polylith-multi/personalities/federationapi.go
@@ -35,7 +35,7 @@ func FederationAPI(base *basepkg.BaseDendrite, cfg *config.Dendrite) {
&base.Cfg.MSCs, nil,
)
- intAPI := federationapi.NewInternalAPI(base, federation, rsAPI, base.Caches, true)
+ intAPI := federationapi.NewInternalAPI(base, federation, rsAPI, base.Caches, nil, true)
federationapi.AddInternalRoutes(base.InternalAPIMux, intAPI)
base.SetupAndServeHTTP(
diff --git a/cmd/dendrite-polylith-multi/personalities/roomserver.go b/cmd/dendrite-polylith-multi/personalities/roomserver.go
index 23514dbe..1deb51ce 100644
--- a/cmd/dendrite-polylith-multi/personalities/roomserver.go
+++ b/cmd/dendrite-polylith-multi/personalities/roomserver.go
@@ -24,7 +24,7 @@ func RoomServer(base *basepkg.BaseDendrite, cfg *config.Dendrite) {
asAPI := base.AppserviceHTTPClient()
fsAPI := base.FederationAPIHTTPClient()
rsAPI := roomserver.NewInternalAPI(base)
- rsAPI.SetFederationAPI(fsAPI)
+ rsAPI.SetFederationAPI(fsAPI, fsAPI.KeyRing())
rsAPI.SetAppserviceAPI(asAPI)
roomserver.AddInternalRoutes(base.InternalAPIMux, rsAPI)
diff --git a/cmd/dendritejs-pinecone/main.go b/cmd/dendritejs-pinecone/main.go
index 10ba0717..8bcb063e 100644
--- a/cmd/dendritejs-pinecone/main.go
+++ b/cmd/dendritejs-pinecone/main.go
@@ -199,8 +199,7 @@ func startup() {
)
rsAPI.SetAppserviceAPI(asQuery)
fedSenderAPI := federationapi.NewInternalAPI(base, federation, rsAPI, base.Caches, true)
- rsAPI.SetFederationAPI(fedSenderAPI)
- rsAPI.SetKeyring(keyRing)
+ rsAPI.SetFederationAPI(fedSenderAPI, keyRing)
monolith := setup.Monolith{
Config: base.Cfg,
diff --git a/cmd/dendritejs/main.go b/cmd/dendritejs/main.go
index 96958116..789ea98e 100644
--- a/cmd/dendritejs/main.go
+++ b/cmd/dendritejs/main.go
@@ -211,8 +211,7 @@ func main() {
)
rsAPI.SetAppserviceAPI(asQuery)
fedSenderAPI := federationapi.NewInternalAPI(base, federation, rsAPI, base.Caches, true)
- rsAPI.SetFederationAPI(fedSenderAPI)
- rsAPI.SetKeyring(keyRing)
+ rsAPI.SetFederationAPI(fedSenderAPI, keyRing)
p2pPublicRoomProvider := NewLibP2PPublicRoomsProvider(node, fedSenderAPI, federation)
monolith := setup.Monolith{