mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-14 21:27:23 +01:00
fix(challenges): better screening
This commit is contained in:
@@ -564,6 +564,7 @@ api.joinGroup = {
|
||||
if (!group) throw new NotFound(res.t('groupNotFound'));
|
||||
|
||||
let isUserInvited = false;
|
||||
const seekingParty = Boolean(user.party.seeking);
|
||||
|
||||
if (group.type === 'party') {
|
||||
// Check if was invited to party
|
||||
@@ -729,12 +730,11 @@ api.joinGroup = {
|
||||
invited: isUserInvited,
|
||||
};
|
||||
if (group.type === 'party') {
|
||||
analyticsObject.seekingParty = Boolean(user.party.seeking);
|
||||
analyticsObject.seekingParty = seekingParty;
|
||||
}
|
||||
if (group.privacy === 'public') {
|
||||
analyticsObject.groupName = group.name;
|
||||
}
|
||||
user.party.seeking = undefined;
|
||||
|
||||
if (inviter) promises.push(inviter.save());
|
||||
promises = await Promise.all(promises);
|
||||
|
||||
Reference in New Issue
Block a user