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:
Jawad Jahangir
2019-08-15 21:06:56 +06:00
committed by Sabe Jones
parent f0e6703546
commit 5a83f93ade
4 changed files with 65 additions and 39 deletions

View File

@@ -392,7 +392,7 @@ schema.methods.canGetGems = async function canObtainGems () {
schema.methods.isMemberOfGroupPlan = async function isMemberOfGroupPlan () {
const groups = await getUserGroupData(this);
return groups.every(g => {
return groups.some(g => {
return g.isSubscribed();
});
};