diff --git a/website/src/controllers/groups.js b/website/src/controllers/groups.js index 248675ac8b..f93bf9c47f 100644 --- a/website/src/controllers/groups.js +++ b/website/src/controllers/groups.js @@ -625,7 +625,6 @@ var inviteByEmails = function(invites, group, req, res, next){ // TODO implement "users can only be invited once" // Check for the email address not to be unsubscribed - EmailUnsubscription.findOne({email: invite.email}, function(err, unsubscribed){ if(err) return cb(err); if(unsubscribed) return cb(); @@ -633,7 +632,7 @@ var inviteByEmails = function(invites, group, req, res, next){ utils.txnEmail(invite, ('invite-friend' + (group.type == 'guild' ? '-guild' : '')), variables); cb(); - }) + }); }); }else{ cb(); diff --git a/website/src/utils.js b/website/src/utils.js index e745b90090..bfb550e146 100644 --- a/website/src/utils.js +++ b/website/src/utils.js @@ -73,8 +73,8 @@ module.exports.txnEmail = function(mailingInfoArray, emailType, variables, perso }); // Personal variables are personal to each email recipient, if they are missing - // we manually create a structure for them with RECIPIENT_NAME and RECIPIENT_ID - // otherwise we just add RECIPIENT_NAME and RECIPIENT_ID to the existing personal variables + // we manually create a structure for them with RECIPIENT_NAME and RECIPIENT_UNSUB_URL + // otherwise we just add RECIPIENT_NAME and RECIPIENT_UNSUB_URL to the existing personal variables if(!personalVariables || personalVariables.length === 0){ personalVariables = mailingInfoArray.map(function(mailingInfo){ return {