mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-14 07:52:15 +00:00
invite friend to guild: pass guild name
This commit is contained in:
parent
be27646143
commit
9c6fc78a2f
1 changed files with 4 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue