Skip to content

Commit

Permalink
feat: also pass in uid to filter:email.prepare
Browse files Browse the repository at this point in the history
  • Loading branch information
julianlam committed Feb 25, 2021
1 parent 27ea3dc commit 86b0c57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/emailer.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ Emailer.send = async (template, uid, params) => {
}

let userData = await User.getUserFields(uid, ['email', 'username', 'email:confirmed']);
({ template, userData, params } = await Plugins.hooks.fire('filter:email.prepare', { template, userData, params }));
({ template, userData, params } = await Plugins.hooks.fire('filter:email.prepare', { template, uid, userData, params }));
if (!userData || !userData.email) {
if (process.env.NODE_ENV === 'development') {
winston.warn(`uid : ${uid} has no email, not sending "${template}" email.`);
Expand Down

0 comments on commit 86b0c57

Please sign in to comment.