mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 18:43:10 -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)
|
||||
}
|
||||
// Ensure there is any spam counter measure when enabling registration
|
||||
if !c.RegistrationDisabled && !c.OpenRegistrationWithoutVerificationEnabled {
|
||||
if !c.RecaptchaEnabled {
|
||||
if !c.RegistrationDisabled && !c.OpenRegistrationWithoutVerificationEnabled && !c.RecaptchaEnabled {
|
||||
configErrs.Add(
|
||||
"You have tried to enable open registration without any secondary verification methods " +
|
||||
"(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.",
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
type TURN struct {
|
||||
|
|
|
|||
Loading…
Reference in a new issue