From b48842cc6ea591924413436c4986de5c451de89a Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Thu, 5 May 2022 11:11:36 +0100 Subject: [PATCH] Use `gomatrixserverlib.Client` for three-PID invites --- clientapi/threepid/invites.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clientapi/threepid/invites.go b/clientapi/threepid/invites.go index 6b750199b..eee6992f8 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 }