Review comments

This commit is contained in:
Neil Alexander 2021-03-04 14:58:19 +00:00
parent 0d95e06045
commit e7bdd06e93
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 3 additions and 5 deletions

View file

@ -46,7 +46,6 @@ import (
"github.com/matrix-org/gomatrixserverlib/tokens" "github.com/matrix-org/gomatrixserverlib/tokens"
"github.com/matrix-org/util" "github.com/matrix-org/util"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/sirupsen/logrus"
log "github.com/sirupsen/logrus" log "github.com/sirupsen/logrus"
) )
@ -691,8 +690,6 @@ func handleApplicationServiceRegistration(
cfg *config.ClientAPI, cfg *config.ClientAPI,
userAPI userapi.UserInternalAPI, userAPI userapi.UserInternalAPI,
) util.JSONResponse { ) util.JSONResponse {
logrus.Warnf("APPSERVICE Is appservice registration %q", r.Username)
// Check if we previously had issues extracting the access token from the // Check if we previously had issues extracting the access token from the
// request. // request.
if tokenErr != nil { if tokenErr != nil {

View file

@ -290,8 +290,9 @@ func (b *BaseDendrite) CreateClient() *gomatrixserverlib.Client {
return client return client
} }
// CreateClient creates a new client (normally used for media fetch requests). // CreateAppserviceClient creates a new client for application services.
// Should only be called once per component. // It has a specific timeout and obeys TLS validation from the appservice
// config rather than the federation config.
func (b *BaseDendrite) CreateAppserviceClient() *gomatrixserverlib.Client { func (b *BaseDendrite) CreateAppserviceClient() *gomatrixserverlib.Client {
opts := []gomatrixserverlib.ClientOption{ opts := []gomatrixserverlib.ClientOption{
gomatrixserverlib.WithSkipVerify(b.Cfg.AppServiceAPI.DisableTLSValidation), gomatrixserverlib.WithSkipVerify(b.Cfg.AppServiceAPI.DisableTLSValidation),