mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 07:25:46 +01:00
feat: revamp email templates to be more style agnostic (#7375)
* feat: re-designed digest
Updated design, logic no longer shows "no topics", just doesn't
show the list at all, teaser re-retrieved for digest so that it
always grabs a teaser even if there is no reply, changed default
email background to a light grey.
* fix: minor padding issues in digest
* fix: banned template
* fix: invitation.tpl
* fix: removed unused notif_chat and notif_post email templates
* fix: notification template
* fix: registration_accepted template
* fix: reset tpl
* fix: test tpl
* fix: email verify tpl
* fix: reset notify tpl
* fix: welcome tpl
* fix: additional minor font fixes
* fix: removed unused email header image assets
* fix: internationalised 'your daily digest' string
* fix: broken url in digest 🤦
* feat: added RTL support for emailer
/cc @PostMidnight
This commit is contained in:
@@ -195,12 +195,13 @@ Emailer.send = function (template, uid, params, callback) {
|
||||
settings: async.apply(User.getSettings, uid),
|
||||
}, next);
|
||||
},
|
||||
function (results, next) {
|
||||
async function (results, next) {
|
||||
if (!results.email) {
|
||||
winston.warn('uid : ' + uid + ' has no email, not sending.');
|
||||
return next();
|
||||
}
|
||||
params.uid = uid;
|
||||
params.rtl = await translator.translate('[[language:dir]]', results.settings.userLang) === 'rtl';
|
||||
Emailer.sendToEmail(template, results.email, results.settings.userLang, params, next);
|
||||
},
|
||||
], callback);
|
||||
@@ -282,6 +283,7 @@ Emailer.sendToEmail = function (template, email, language, params, callback) {
|
||||
pid: params.pid,
|
||||
fromUid: params.fromUid,
|
||||
headers: params.headers,
|
||||
rtl: params.rtl,
|
||||
};
|
||||
Plugins.fireHook('filter:email.modify', data, next);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user