mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-06 13:43:09 -06:00
Avoid warning about open registration
This commit is contained in:
parent
9722df46f8
commit
d456cb5240
|
|
@ -100,7 +100,10 @@ func main() {
|
|||
}
|
||||
}
|
||||
|
||||
b := base.NewBaseDendrite(cfg, "", base.CreateAccountMode)
|
||||
// avoid warning about open registration
|
||||
cfg.ClientAPI.RegistrationDisabled = true
|
||||
|
||||
b := base.NewBaseDendrite(cfg, "")
|
||||
defer b.Close() // nolint: errcheck
|
||||
|
||||
accountDB, err := storage.NewUserAPIDatabase(
|
||||
|
|
|
|||
|
|
@ -100,7 +100,6 @@ const (
|
|||
DisableMetrics BaseDendriteOptions = iota
|
||||
UseHTTPAPIs
|
||||
PolylithMode
|
||||
CreateAccountMode
|
||||
)
|
||||
|
||||
// NewBaseDendrite creates a new instance to be used by a component.
|
||||
|
|
@ -111,7 +110,6 @@ func NewBaseDendrite(cfg *config.Dendrite, componentName string, options ...Base
|
|||
useHTTPAPIs := false
|
||||
enableMetrics := true
|
||||
isMonolith := true
|
||||
createAccountMode := false
|
||||
for _, opt := range options {
|
||||
switch opt {
|
||||
case DisableMetrics:
|
||||
|
|
@ -121,9 +119,6 @@ func NewBaseDendrite(cfg *config.Dendrite, componentName string, options ...Base
|
|||
case PolylithMode:
|
||||
isMonolith = false
|
||||
useHTTPAPIs = true
|
||||
case CreateAccountMode:
|
||||
createAccountMode = true
|
||||
cfg.ClientAPI.OpenRegistrationWithoutVerificationEnabled = true
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -142,7 +137,7 @@ func NewBaseDendrite(cfg *config.Dendrite, componentName string, options ...Base
|
|||
|
||||
logrus.Infof("Dendrite version %s", internal.VersionString())
|
||||
|
||||
if !createAccountMode && !cfg.ClientAPI.RegistrationDisabled && cfg.ClientAPI.OpenRegistrationWithoutVerificationEnabled {
|
||||
if !cfg.ClientAPI.RegistrationDisabled && cfg.ClientAPI.OpenRegistrationWithoutVerificationEnabled {
|
||||
logrus.Warn("Open registration is enabled")
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue