aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2022-04-04 17:26:01 +0100
committerNeil Alexander <neilalexander@users.noreply.github.com>2022-04-04 17:26:01 +0100
commitf2f9d2916b3a2f23761bbfab98940eb84c36f3b1 (patch)
tree61e8616d0a0ed88758564c19a8fd526c7b983215 /cmd
parentcee12a7ab06c0b41499e13ccd8d4ea3cd4832ab0 (diff)
Fix `dendritejs-pinecone` build
Diffstat (limited to 'cmd')
-rw-r--r--cmd/dendritejs-pinecone/main.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/cmd/dendritejs-pinecone/main.go b/cmd/dendritejs-pinecone/main.go
index 05cdf29e..ba9edf23 100644
--- a/cmd/dendritejs-pinecone/main.go
+++ b/cmd/dendritejs-pinecone/main.go
@@ -21,8 +21,6 @@ import (
"crypto/ed25519"
"encoding/hex"
"fmt"
- "log"
- "os"
"syscall/js"
"time"
@@ -154,9 +152,8 @@ func startup() {
sk := generateKey()
pk := sk.Public().(ed25519.PublicKey)
- logger := log.New(os.Stdout, "", 0)
- pRouter := pineconeRouter.NewRouter(logger, sk, false)
- pSessions := pineconeSessions.NewSessions(logger, pRouter)
+ pRouter := pineconeRouter.NewRouter(logrus.WithField("pinecone", "router"), sk, false)
+ pSessions := pineconeSessions.NewSessions(logrus.WithField("pinecone", "sessions"), pRouter, []string{"matrix"})
cfg := &config.Dendrite{}
cfg.Defaults(true)
@@ -228,7 +225,7 @@ func startup() {
httpRouter.PathPrefix(httputil.PublicClientPathPrefix).Handler(base.PublicClientAPIMux)
httpRouter.PathPrefix(httputil.PublicMediaPathPrefix).Handler(base.PublicMediaAPIMux)
- p2pRouter := pSessions.HTTP().Mux()
+ p2pRouter := pSessions.Protocol("matrix").HTTP().Mux()
p2pRouter.Handle(httputil.PublicFederationPathPrefix, base.PublicFederationAPIMux)
p2pRouter.Handle(httputil.PublicMediaPathPrefix, base.PublicMediaAPIMux)