aboutsummaryrefslogtreecommitdiff
path: root/cmd/furl
diff options
context:
space:
mode:
authorkegsay <kegan@matrix.org>2023-04-19 15:50:33 +0100
committerGitHub <noreply@github.com>2023-04-19 15:50:33 +0100
commit72285b2659a31ebd52c91799c17105d81d996f40 (patch)
tree1855395f5efdc3ea6051dd502882bf62aaa57e7c /cmd/furl
parent9fa39263c0a4a8d349c8715f6ba30cae30b1b73a (diff)
refactor: update GMSL (#3058)
Sister PR to https://github.com/matrix-org/gomatrixserverlib/pull/364 Read this commit by commit to avoid going insane.
Diffstat (limited to 'cmd/furl')
-rw-r--r--cmd/furl/main.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/cmd/furl/main.go b/cmd/furl/main.go
index 32e99704..cdfef09f 100644
--- a/cmd/furl/main.go
+++ b/cmd/furl/main.go
@@ -14,6 +14,7 @@ import (
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/gomatrixserverlib/fclient"
+ "github.com/matrix-org/gomatrixserverlib/spec"
)
var requestFrom = flag.String("from", "", "the server name that the request should originate from")
@@ -49,7 +50,7 @@ func main() {
panic("unexpected key block")
}
- serverName := gomatrixserverlib.ServerName(*requestFrom)
+ serverName := spec.ServerName(*requestFrom)
client := fclient.NewFederationClient(
[]*fclient.SigningIdentity{
{
@@ -83,10 +84,10 @@ func main() {
}
}
- req := gomatrixserverlib.NewFederationRequest(
+ req := fclient.NewFederationRequest(
method,
serverName,
- gomatrixserverlib.ServerName(u.Host),
+ spec.ServerName(u.Host),
u.RequestURI(),
)
@@ -97,7 +98,7 @@ func main() {
}
if err = req.Sign(
- gomatrixserverlib.ServerName(*requestFrom),
+ spec.ServerName(*requestFrom),
gomatrixserverlib.KeyID(keyBlock.Headers["Key-ID"]),
privateKey,
); err != nil {