mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-14 10:12:21 +00:00
site can be used when sessionPartyInvite is invalid
This commit is contained in:
parent
9dfe18bc70
commit
f303a71e66
1 changed files with 5 additions and 1 deletions
|
|
@ -459,7 +459,11 @@ api.sessionPartyInvite = function(req,res,next){
|
|||
.select('invites members').exec(cb);
|
||||
},
|
||||
function(group, cb){
|
||||
if (!group) return cb("Inviter not in party");
|
||||
if (!group){
|
||||
// Don't send error as it will prevent users from using the site
|
||||
delete req.session.partyInvite;
|
||||
return cb();
|
||||
}
|
||||
inv.party = req.session.partyInvite;
|
||||
delete req.session.partyInvite;
|
||||
if (!~group.invites.indexOf(res.locals.user._id))
|
||||
|
|
|
|||
Loading…
Reference in a new issue