mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
reset perkMonthCount when subscription ends
This commit is contained in:
@@ -279,6 +279,8 @@ export async function cron (options = {}) {
|
||||
|
||||
if (user.isSubscribed()) {
|
||||
await grantEndOfTheMonthPerks(user, now);
|
||||
} if (!user.isSubscribed() && user.purchased.plan.perkMonthCount > 0) {
|
||||
user.purchased.plan.perkMonthCount = 0;
|
||||
}
|
||||
|
||||
const { plan } = user.purchased;
|
||||
|
||||
Reference in New Issue
Block a user