aboutsummaryrefslogtreecommitdiff
path: root/clientapi/threepid/invites.go
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2022-05-05 11:33:16 +0100
committerGitHub <noreply@github.com>2022-05-05 11:33:16 +0100
commitd9e71b93b68efb57582d02448883b8a1259205e8 (patch)
treeec9e43445e09cc10908a8ef50223310ec1cac627 /clientapi/threepid/invites.go
parent1bfe87aa5614d68cbb0cad127b375048cdc70ca9 (diff)
Use `gomatrixserverlib.Client` instead of `http.Client` (#2421)
* Update to matrix-org/gomatrixserverlib#303 * Use `gomatrixserverlib.Client` for phone-home stats * Use `gomatrixserverlib.Client` for push notifications * Use `gomatrixserverlib.Client` for appservices * Use `gomatrixserverlib.Client` for three-PID invites
Diffstat (limited to 'clientapi/threepid/invites.go')
-rw-r--r--clientapi/threepid/invites.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/clientapi/threepid/invites.go b/clientapi/threepid/invites.go
index 6b750199..eee6992f 100644
--- a/clientapi/threepid/invites.go
+++ b/clientapi/threepid/invites.go
@@ -231,7 +231,7 @@ func queryIDServerStoreInvite(
profile = &authtypes.Profile{}
}
- client := http.Client{}
+ client := gomatrixserverlib.NewClient()
data := url.Values{}
data.Add("medium", body.Medium)
@@ -253,7 +253,7 @@ func queryIDServerStoreInvite(
}
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
- resp, err := client.Do(req.WithContext(ctx))
+ resp, err := client.DoHTTPRequest(ctx, req)
if err != nil {
return nil, err
}