mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Free group plan subscription from a party/guild no longer gets cancelled after leaving a guild - fixes #11055 (#11228)
* bug fix: free group plan subscription from party/guild is no longer cancelled when leaving a guild * free group plan subscription from party/guild no longer gets cancelled when leaving a guild * bug fix: free group plan subscription from party/guild is no longer cancelled when leaving a guild * free group plan subscription from party/guild no longer gets cancelled when leaving a guild * Added tests to check if a member of a group plan maintains free subscription when leaving another group without a plan * Added tests to check if member of a group plan still keeps free subscription when leaving some other group without a plan * bug fix: free group plan subscription from party/guild is no longer cancelled when leaving a guild * free group plan subscription from party/guild no longer gets cancelled when leaving a guild * bug fix: free group plan subscription from party/guild is no longer cancelled when leaving a guild * free group plan subscription from party/guild no longer gets cancelled when leaving a guild * Added tests to check if a member of a group plan maintains free subscription when leaving another group without a plan * Added tests to check if member of a group plan still keeps free subscription when leaving some other group without a plan
This commit is contained in:
committed by
Sabe Jones
parent
f0e6703546
commit
5a83f93ade
@@ -776,7 +776,7 @@ api.leaveGroup = {
|
||||
|
||||
if (group.type !== 'party') {
|
||||
let guildIndex = user.guilds.indexOf(group._id);
|
||||
user.guilds.splice(guildIndex, 1);
|
||||
if (guildIndex >= 0) user.guilds.splice(guildIndex, 1);
|
||||
}
|
||||
|
||||
let isMemberOfGroupPlan = await user.isMemberOfGroupPlan();
|
||||
|
||||
Reference in New Issue
Block a user