mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 10:33:11 -06:00
flatten nested if statement
This commit is contained in:
parent
57893fea93
commit
3701190ce7
|
|
@ -93,8 +93,7 @@ func (c *ClientAPI) Verify(configErrs *ConfigErrors) {
|
||||||
checkNotEmpty(configErrs, "client_api.recaptcha_sitekey_class", c.RecaptchaSitekeyClass)
|
checkNotEmpty(configErrs, "client_api.recaptcha_sitekey_class", c.RecaptchaSitekeyClass)
|
||||||
}
|
}
|
||||||
// Ensure there is any spam counter measure when enabling registration
|
// Ensure there is any spam counter measure when enabling registration
|
||||||
if !c.RegistrationDisabled && !c.OpenRegistrationWithoutVerificationEnabled {
|
if !c.RegistrationDisabled && !c.OpenRegistrationWithoutVerificationEnabled && !c.RecaptchaEnabled {
|
||||||
if !c.RecaptchaEnabled {
|
|
||||||
configErrs.Add(
|
configErrs.Add(
|
||||||
"You have tried to enable open registration without any secondary verification methods " +
|
"You have tried to enable open registration without any secondary verification methods " +
|
||||||
"(such as reCAPTCHA). By enabling open registration, you are SIGNIFICANTLY " +
|
"(such as reCAPTCHA). By enabling open registration, you are SIGNIFICANTLY " +
|
||||||
|
|
@ -104,7 +103,6 @@ func (c *ClientAPI) Verify(configErrs *ConfigErrors) {
|
||||||
"should set the registration_disabled option in your Dendrite config.",
|
"should set the registration_disabled option in your Dendrite config.",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type TURN struct {
|
type TURN struct {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue