diff options
author | Kegsay <kegan@matrix.org> | 2020-06-04 15:43:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-04 15:43:07 +0100 |
commit | 9834ac97db042b0c78fbd72652aa534129ca3afe (patch) | |
tree | 4fd862ffba61e47f94b2fcc5685a0502e21b3c70 /appservice/appservice.go | |
parent | d785ad82b996989381657292fbd2c28b9fbb7df6 (diff) |
Convert everything but serverkeyapi to inthttp (#1096)
* Convert roomserver to new inthttp format
* Convert eduserver to new inthttp format
* Convert appservice to new inthttp format
Diffstat (limited to 'appservice/appservice.go')
-rw-r--r-- | appservice/appservice.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/appservice/appservice.go b/appservice/appservice.go index 68cf52e7..b5ffba5e 100644 --- a/appservice/appservice.go +++ b/appservice/appservice.go @@ -23,6 +23,7 @@ import ( appserviceAPI "github.com/matrix-org/dendrite/appservice/api" "github.com/matrix-org/dendrite/appservice/consumers" + "github.com/matrix-org/dendrite/appservice/inthttp" "github.com/matrix-org/dendrite/appservice/query" "github.com/matrix-org/dendrite/appservice/routing" "github.com/matrix-org/dendrite/appservice/storage" @@ -77,14 +78,14 @@ func SetupAppServiceAPIComponent( // Create appserivce query API with an HTTP client that will be used for all // outbound and inbound requests (inbound only for the internal API) - appserviceQueryAPI := query.AppServiceQueryAPI{ + appserviceQueryAPI := &query.AppServiceQueryAPI{ HTTPClient: &http.Client{ Timeout: time.Second * 30, }, Cfg: base.Cfg, } - appserviceQueryAPI.SetupHTTP(base.InternalAPIMux) + inthttp.AddRoutes(appserviceQueryAPI, base.InternalAPIMux) consumer := consumers.NewOutputRoomEventConsumer( base.Cfg, base.KafkaConsumer, accountsDB, appserviceDB, @@ -105,7 +106,7 @@ func SetupAppServiceAPIComponent( accountsDB, federation, transactionsCache, ) - return &appserviceQueryAPI + return appserviceQueryAPI } // generateAppServiceAccounts creates a dummy account based off the |