|
|
@ -230,6 +230,16 @@ Emailer.send = async (template, uid, params) => {
|
|
|
|
params.uid = uid;
|
|
|
|
params.uid = uid;
|
|
|
|
params.username = userData.username;
|
|
|
|
params.username = userData.username;
|
|
|
|
params.rtl = await translator.translate('[[language:dir]]', userSettings.userLang) === 'rtl';
|
|
|
|
params.rtl = await translator.translate('[[language:dir]]', userSettings.userLang) === 'rtl';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const result = await Plugins.hooks.fire('filter:email.cancel', {
|
|
|
|
|
|
|
|
cancel: false, // set to true in plugin to cancel sending email
|
|
|
|
|
|
|
|
template: template,
|
|
|
|
|
|
|
|
params: params,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (result.cancel) {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
await Emailer.sendToEmail(template, userData.email, userSettings.userLang, params);
|
|
|
|
await Emailer.sendToEmail(template, userData.email, userSettings.userLang, params);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|