invite friend to guild: pass guild name

This commit is contained in:
Matteo Pagliazzi 2015-02-10 22:07:36 +01:00
parent be27646143
commit 9c6fc78a2f

View file

@ -613,6 +613,10 @@ var inviteByEmails = function(invites, group, req, res, next){
{name: 'INVITER', content: req.body.inviter || utils.getUserInfo(res.locals.user, ['name']).name}
];
if(group.type == 'guild'){
variables.push({name: 'GUILD_NAME', content: group.name});
}
// TODO implement "users can only be invited once"
invite.canSend = true; // Requested by utils.txnEmail
utils.txnEmail(invite, ('invite-friend' + (group.type == 'guild' ? '-guild' : '')), variables);