diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2020-06-16 14:29:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-16 14:29:11 +0100 |
commit | fc0e74ae0f02b7bb9d71d739660deef824ddbd33 (patch) | |
tree | fd718a25749cc56e08412d565f5f1bf472156eb4 /cmd/dendritejs/main.go | |
parent | 9c77022513f400db59409f5b55fc6223d38d6bb8 (diff) |
Fix media API for demos and possibly Synapse (#1134)
* Fix media API for demos and possibly Synapse
* User API
* goimports
Diffstat (limited to 'cmd/dendritejs/main.go')
-rw-r--r-- | cmd/dendritejs/main.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/dendritejs/main.go b/cmd/dendritejs/main.go index 7930c28d..aa919212 100644 --- a/cmd/dendritejs/main.go +++ b/cmd/dendritejs/main.go @@ -145,6 +145,11 @@ func createFederationClient(cfg *config.Dendrite, node *go_http_js_libp2p.P2pLoc return fed } +func createClient(node *go_http_js_libp2p.P2pLocalNode) *gomatrixserverlib.Client { + tr := go_http_js_libp2p.NewP2pTransport(node) + return gomatrixserverlib.NewClientWithTransport(tr) +} + func createP2PNode(privKey ed25519.PrivateKey) (serverName string, node *go_http_js_libp2p.P2pLocalNode) { hosted := "/dns4/rendezvous.matrix.org/tcp/8443/wss/p2p-websocket-star/" node = go_http_js_libp2p.NewP2pLocalNode("org.matrix.p2p.experiment", privKey.Seed(), []string{hosted}, "p2p") @@ -218,6 +223,7 @@ func main() { Config: base.Cfg, AccountDB: accountDB, DeviceDB: deviceDB, + Client: createClient(node), FedClient: federation, KeyRing: &keyRing, KafkaConsumer: base.KafkaConsumer, |