mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-15 10:03:09 -06:00
flatten nested if statement
This commit is contained in:
parent
57893fea93
commit
3701190ce7
|
|
@ -93,17 +93,15 @@ 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 " +
|
"increasing the risk that your server will be used to send spam or abuse, and may result in " +
|
||||||
"increasing the risk that your server will be used to send spam or abuse, and may result in " +
|
"your server being banned from some rooms. If you are ABSOLUTELY CERTAIN you want to do this, " +
|
||||||
"your server being banned from some rooms. If you are ABSOLUTELY CERTAIN you want to do this, " +
|
"start Dendrite with the -really-enable-open-registration command line flag. Otherwise, you " +
|
||||||
"start Dendrite with the -really-enable-open-registration command line flag. Otherwise, you " +
|
"should set the registration_disabled option in your Dendrite config.",
|
||||||
"should set the registration_disabled option in your Dendrite config.",
|
)
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue