aboutsummaryrefslogtreecommitdiff
path: root/cmd/dendritejs
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2021-01-22 16:09:05 +0000
committerGitHub <noreply@github.com>2021-01-22 16:09:05 +0000
commit6757b67a321c684769ad022351541c7c6417c693 (patch)
tree261accd97b834dfb42b9bbade97a4e3c2067e3d2 /cmd/dendritejs
parent93942f8ab62ffdb55888d5d35adef6fe73e3ea59 (diff)
NewClient and NewFederationClient updates (#1730)
* Use matrix-org/gomatrixserverlib#252 * Add missing WithSkipVerify to test * Functions instead * Update gomatrixserverlib to matrix-org/gomatrixserverlib#252 * Fix disabling TLS validation
Diffstat (limited to 'cmd/dendritejs')
-rw-r--r--cmd/dendritejs/main.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/cmd/dendritejs/main.go b/cmd/dendritejs/main.go
index 1ffb1667..b77d141d 100644
--- a/cmd/dendritejs/main.go
+++ b/cmd/dendritejs/main.go
@@ -139,16 +139,18 @@ func createFederationClient(cfg *config.Dendrite, node *go_http_js_libp2p.P2pLoc
tr := go_http_js_libp2p.NewP2pTransport(node)
fed := gomatrixserverlib.NewFederationClient(
- cfg.Global.ServerName, cfg.Global.KeyID, cfg.Global.PrivateKey, true,
+ cfg.Global.ServerName, cfg.Global.KeyID, cfg.Global.PrivateKey,
+ gomatrixserverlib.WithTransport(tr),
)
- fed.Client = *gomatrixserverlib.NewClientWithTransport(tr)
return fed
}
func createClient(node *go_http_js_libp2p.P2pLocalNode) *gomatrixserverlib.Client {
tr := go_http_js_libp2p.NewP2pTransport(node)
- return gomatrixserverlib.NewClientWithTransport(tr)
+ return gomatrixserverlib.NewClient(
+ gomatrixserverlib.WithTransport(tr),
+ )
}
func createP2PNode(privKey ed25519.PrivateKey) (serverName string, node *go_http_js_libp2p.P2pLocalNode) {