mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-29 12:42:46 +00:00
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
This commit is contained in:
parent
1bfe87aa56
commit
d9e71b93b6
8 changed files with 35 additions and 44 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue