mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-12 06:57:47 +00:00
fix "already pending invite"
This commit is contained in:
parent
834e2438b9
commit
3bd6771687
1 changed files with 1 additions and 1 deletions
|
|
@ -179,7 +179,7 @@ api.invite = function(req, res, next) {
|
|||
return res.json(400, {err:"User already invited to that group"});
|
||||
sendInvite();
|
||||
} else if (group.type == 'party') {
|
||||
if (invite.invitations && invite.invitations.party)
|
||||
if (invite.invitations && !_.isEmpty(invite.invitations.party))
|
||||
return res.json(400,{err:"User already pending invitation."});
|
||||
Group.find({type:'party', members:{$in:[uuid]}}, function(err, groups){
|
||||
if (err) return res.json(500,{err:err});
|
||||
|
|
|
|||
Loading…
Reference in a new issue