added support for changing the subject prefi

This commit is contained in:
Wyatt Johnson
2017-12-14 16:28:08 -06:00
parent d9654b52cf
commit d207b240f2
3 changed files with 13 additions and 3 deletions
+3
View File
@@ -20,6 +20,9 @@ const CONFIG = {
// WEBPACK indicates when webpack is currently building.
WEBPACK: process.env.WEBPACK === 'TRUE',
// EMAIL_SUBJECT_PREFIX is the string before emails in the subject.
EMAIL_SUBJECT_PREFIX: process.env.TALK_EMAIL_SUBJECT_PREFIX || '[Talk]',
// When TRUE, it ensures that database indexes created in core will not add
// indexes.
CREATE_MONGO_INDEXES: process.env.DISABLE_CREATE_MONGO_INDEXES !== 'TRUE',
+7 -1
View File
@@ -460,4 +460,10 @@ Could be read as:
## TALK_DISABLE_IGNORE_FLAGS_AGAINST_STAFF
When `TRUE`, staff members will have their accounts and comments moderated the
same as any other user in the system. (Default `FALSE`)
same as any other user in the system. (Default `FALSE`)
## TALK_EMAIL_SUBJECT_PREFIX
The prefix for the subject of emails sent. An email with the specified subject
of `Email Confirmation` would then be sent as `[Talk] Email Confirmation`.
(Default `[Talk]`)
+3 -2
View File
@@ -13,7 +13,8 @@ const {
SMTP_USERNAME,
SMTP_PORT,
SMTP_PASSWORD,
SMTP_FROM_ADDRESS
SMTP_FROM_ADDRESS,
EMAIL_SUBJECT_PREFIX,
} = require('../config');
// load all the templates as strings
@@ -95,7 +96,7 @@ const mailer = module.exports = {
}
// Prefix the subject with `[Talk]`.
subject = `[Talk] ${subject}`;
subject = `${EMAIL_SUBJECT_PREFIX} ${subject}`;
attachLocals(locals);