Add additional information to entitlement level log-line of context job.

This commit is contained in:
Alex Hart
2025-09-02 09:48:21 -03:00
committed by Greyson Parrelli
parent a5c4c3b54a
commit e083076e40

View File

@@ -228,8 +228,9 @@ class InAppPaymentRecurringContextJob private constructor(
return when (inAppPayment.type) {
InAppPaymentType.RECURRING_BACKUP -> {
if (whoAmIResponse.entitlements?.backup?.backupLevel != SubscriptionsConfiguration.BACKUPS_LEVEL.toLong()) {
info("Entitlement level does not match expected paid backups level.")
val whoAmIEntitlementLevel = whoAmIResponse.entitlements?.backup?.backupLevel
if (whoAmIEntitlementLevel != SubscriptionsConfiguration.BACKUPS_LEVEL.toLong()) {
info("WhoAmI entitlement level ($whoAmIEntitlementLevel) does not match expected paid backups level (${SubscriptionsConfiguration.BACKUPS_LEVEL.toLong()}). Forcing a redemption.")
return false
}