mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Merge branch 'bugfix-extramonths-lost-when-subscription-terminated' of https://github.com/hamboomger/habitica into hamboomger-bugfix-extramonths-lost-when-subscription-terminated
This commit is contained in:
@@ -863,11 +863,6 @@ api.leaveGroup = {
|
||||
if (guildIndex >= 0) user.guilds.splice(guildIndex, 1);
|
||||
}
|
||||
|
||||
const isMemberOfGroupPlan = await user.isMemberOfGroupPlan();
|
||||
if (!isMemberOfGroupPlan) {
|
||||
await payments.cancelGroupSubscriptionForUser(user, group);
|
||||
}
|
||||
|
||||
if (group.hasNotCancelled()) await group.updateGroupPlan(true);
|
||||
res.respond(200, {});
|
||||
},
|
||||
@@ -1317,7 +1312,7 @@ api.getGroupPlans = {
|
||||
.select('leaderOnly leader purchased name managers')
|
||||
.exec();
|
||||
|
||||
const groupPlans = groups.filter(group => group.isSubscribed());
|
||||
const groupPlans = groups.filter(group => group.hasActiveGroupPlan());
|
||||
|
||||
res.respond(200, groupPlans);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user