From 86b0c57d7a88cdeeb022d701fee1e355bf9e2144 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 25 Feb 2021 17:11:57 -0500 Subject: [PATCH] feat: also pass in uid to `filter:email.prepare` --- src/emailer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emailer.js b/src/emailer.js index f212a3c919..e95fa612fd 100644 --- a/src/emailer.js +++ b/src/emailer.js @@ -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.`);