Rephrase emailer conflict error messages

pull/5910/head
Chocobozzz 2023-07-27 16:41:35 +02:00
parent 809fecf2b4
commit 787d822cd4
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 5 additions and 5 deletions

View File

@ -139,16 +139,16 @@ function checkSecretsConfig () {
function checkEmailConfig () {
if (!isEmailEnabled()) {
if (CONFIG.SIGNUP.ENABLED && CONFIG.SIGNUP.REQUIRES_EMAIL_VERIFICATION) {
throw new Error('Emailer is disabled but you require signup email verification.')
throw new Error('SMTP is not configured but you require signup email verification.')
}
if (CONFIG.SIGNUP.ENABLED && CONFIG.SIGNUP.REQUIRES_APPROVAL) {
// eslint-disable-next-line max-len
logger.warn('Emailer is disabled but signup approval is enabled: PeerTube will not be able to send an email to the user upon acceptance/rejection of the registration request')
logger.warn('SMTP is not configured but signup approval is enabled: PeerTube will not be able to send an email to the user upon acceptance/rejection of the registration request')
}
if (CONFIG.CONTACT_FORM.ENABLED) {
logger.warn('Emailer is disabled so the contact form will not work.')
logger.warn('SMTP is not configured so the contact form will not work.')
}
}
}

View File

@ -145,7 +145,7 @@ function checkInvalidConfigIfEmailDisabled (customConfig: CustomConfig, res: exp
if (isEmailEnabled()) return true
if (customConfig.signup.requiresEmailVerification === true) {
res.fail({ message: 'Emailer is disabled but you require signup email verification.' })
res.fail({ message: 'SMTP is not configured but you require signup email verification.' })
return false
}

View File

@ -50,7 +50,7 @@ const contactAdministratorValidator = [
if (isEmailEnabled() === false) {
return res.fail({
status: HttpStatusCode.CONFLICT_409,
message: 'Emailer is not enabled on this instance.'
message: 'SMTP is not configured on this instance.'
})
}