Fix missed cancelation check.

This commit is contained in:
Alex Hart 2024-08-16 15:27:06 -03:00 committed by mtang-signal
parent cc615fbf87
commit b7e9446cde

View file

@ -238,8 +238,8 @@ class InAppPaymentRecurringContextJob private constructor(
warning("Charge failure detected on active subscription: ${chargeFailure.code}: ${chargeFailure.message}")
}
if (inAppPayment.data.redemption!!.keepAlive == true) {
warning("Payment failure during keep-alive, allow keep-alive to retry later.")
if (inAppPayment.data.redemption!!.keepAlive == true && !subscription.isCanceled) {
warning("Payment failure for uncanceled subscription during keep-alive, allow keep-alive to retry later.")
SignalDatabase.inAppPayments.update(
inAppPayment.copy(