flatten nested if statement

This commit is contained in:
CicadaCinema 2023-07-02 16:45:07 +01:00
parent 57893fea93
commit 3701190ce7

View file

@ -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 " +
@ -105,7 +104,6 @@ func (c *ClientAPI) Verify(configErrs *ConfigErrors) {
) )
} }
} }
}
type TURN struct { type TURN struct {
// TODO Guest Support // TODO Guest Support