mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 10:33:11 -06:00
No need for an extra method to create a pushgateway client
This commit is contained in:
parent
c06e253188
commit
3a2e8606c7
|
|
@ -43,7 +43,6 @@ import (
|
|||
|
||||
"github.com/matrix-org/dendrite/internal"
|
||||
"github.com/matrix-org/dendrite/internal/httputil"
|
||||
"github.com/matrix-org/dendrite/internal/pushgateway"
|
||||
"github.com/matrix-org/dendrite/internal/sqlutil"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
|
|
@ -232,11 +231,6 @@ func (b *BaseDendrite) DatabaseConnection(dbProperties *config.DatabaseOptions,
|
|||
return nil, nil, fmt.Errorf("no database connections configured")
|
||||
}
|
||||
|
||||
// PushGatewayHTTPClient returns a new client for interacting with (external) Push Gateways.
|
||||
func (b *BaseDendrite) PushGatewayHTTPClient() pushgateway.Client {
|
||||
return pushgateway.NewHTTPClient(b.Cfg.UserAPI.PushGatewayDisableTLSValidation)
|
||||
}
|
||||
|
||||
// CreateClient creates a new client (normally used for media fetch requests).
|
||||
// Should only be called once per component.
|
||||
func (b *BaseDendrite) CreateClient() *gomatrixserverlib.Client {
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ import (
|
|||
"time"
|
||||
|
||||
fedsenderapi "github.com/matrix-org/dendrite/federationapi/api"
|
||||
"github.com/matrix-org/dendrite/internal/pushgateway"
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
rsapi "github.com/matrix-org/dendrite/roomserver/api"
|
||||
|
|
@ -42,7 +43,7 @@ func NewInternalAPI(
|
|||
js, _ := base.NATS.Prepare(base.ProcessContext, &cfg.Matrix.JetStream)
|
||||
appServices := base.Cfg.Derived.ApplicationServices
|
||||
|
||||
pgClient := base.PushGatewayHTTPClient()
|
||||
pgClient := pushgateway.NewHTTPClient(cfg.PushGatewayDisableTLSValidation)
|
||||
|
||||
db, err := storage.NewUserDatabase(
|
||||
base,
|
||||
|
|
|
|||
Loading…
Reference in a new issue