diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2021-03-05 16:40:32 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-05 16:40:32 +0000 |
commit | 6aa262ead804529f9e328302b0c2e2653ffffd09 (patch) | |
tree | 1f680c247a89965ef57eaa4177d559e17f675d4e /appservice/query/query.go | |
parent | fe021d374256324cc5394599fc9e018caeadc5bb (diff) |
Use default transport for AS traffic (#1789)
* Use default transport for AS traffic
* Update gmsl and use default client
* Remove replace
* Fix go.sum
* Update gomatrixserverlib
* Go back to appservices managing their own HTTP clients because argh
* Add missing context
Diffstat (limited to 'appservice/query/query.go')
-rw-r--r-- | appservice/query/query.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/appservice/query/query.go b/appservice/query/query.go index b4c33528..9f6c79a8 100644 --- a/appservice/query/query.go +++ b/appservice/query/query.go @@ -23,7 +23,6 @@ import ( "github.com/matrix-org/dendrite/appservice/api" "github.com/matrix-org/dendrite/setup/config" - "github.com/matrix-org/gomatrixserverlib" opentracing "github.com/opentracing/opentracing-go" log "github.com/sirupsen/logrus" ) @@ -33,7 +32,7 @@ const userIDExistsPath = "/users/" // AppServiceQueryAPI is an implementation of api.AppServiceQueryAPI type AppServiceQueryAPI struct { - HTTPClient *gomatrixserverlib.Client + HTTPClient *http.Client Cfg *config.Dendrite } @@ -63,7 +62,7 @@ func (a *AppServiceQueryAPI) RoomAliasExists( } req = req.WithContext(ctx) - resp, err := a.HTTPClient.DoHTTPRequest(ctx, req) + resp, err := a.HTTPClient.Do(req) if resp != nil { defer func() { err = resp.Body.Close() @@ -124,7 +123,7 @@ func (a *AppServiceQueryAPI) UserIDExists( if err != nil { return err } - resp, err := a.HTTPClient.DoHTTPRequest(ctx, req) + resp, err := a.HTTPClient.Do(req.WithContext(ctx)) if resp != nil { defer func() { err = resp.Body.Close() |