Fix checks in backup subscription check job.

This commit is contained in:
Alex Hart
2025-03-07 11:25:50 -04:00
committed by Michelle Tang
parent c38342e2fb
commit 3fee68e33e
3 changed files with 17 additions and 7 deletions

View File

@@ -29,7 +29,20 @@ sealed interface BillingPurchaseResult {
val oneMonthAgo = now - 31.days
val purchaseTime = this.purchaseTime.milliseconds
return oneMonthAgo >= purchaseTime
return oneMonthAgo < purchaseTime
}
override fun toString(): String {
return """
BillingPurchaseResult {
purchaseState: $purchaseState
purchaseToken: <redacted>
purchaseTime: $purchaseTime
isAcknowledged: $isAcknowledged
isAutoRenewing: $isAutoRenewing
isWithinTheLastMonth: ${isWithinTheLastMonth()}
}
""".trimIndent()
}
}
data object UserCancelled : BillingPurchaseResult