mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
fix(subscriptions): don't reset Gems midmonth
This commit is contained in:
@@ -125,7 +125,7 @@ export function cron (options = {}) {
|
||||
let perfect = true;
|
||||
|
||||
// Reset Gold-to-Gems cap if it's the start of the month
|
||||
if (user.purchased && user.purchased.plan && moment(user.purchased.plan.dateUpdated).startOf('month') !== moment().startOf('month')) {
|
||||
if (user.purchased && user.purchased.plan && !moment(user.purchased.plan.dateUpdated).startOf('month').isSame(moment().startOf('month'))) {
|
||||
user.purchased.plan.gemsBought = 0;
|
||||
}
|
||||
if (user.isSubscribed()) {
|
||||
|
||||
Reference in New Issue
Block a user