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}") warning("Charge failure detected on active subscription: ${chargeFailure.code}: ${chargeFailure.message}")
} }
if (inAppPayment.data.redemption!!.keepAlive == true) { if (inAppPayment.data.redemption!!.keepAlive == true && !subscription.isCanceled) {
warning("Payment failure during keep-alive, allow keep-alive to retry later.") warning("Payment failure for uncanceled subscription during keep-alive, allow keep-alive to retry later.")
SignalDatabase.inAppPayments.update( SignalDatabase.inAppPayments.update(
inAppPayment.copy( inAppPayment.copy(