Attempt to heal if we have everything we need but no entitlement.

This commit is contained in:
Alex Hart
2025-07-18 16:58:24 -03:00
committed by GitHub
parent e0df5e6df0
commit 84c6719d03
2 changed files with 13 additions and 2 deletions

View File

@@ -327,6 +327,12 @@ class InAppPaymentTable(context: Context, databaseHelper: SignalDatabase) : Data
.run()
}
fun hasPendingBackupRedemption(): Boolean {
return readableDatabase.exists(TABLE_NAME)
.where("$STATE = ? AND $TYPE = ?", State.serialize(State.PENDING), InAppPaymentType.serialize(InAppPaymentType.RECURRING_BACKUP))
.run()
}
/**
* Retrieves from the database the latest payment of the given type that is either in the PENDING or WAITING_FOR_AUTHORIZATION state.
*/