INNER CODE UNIT · JavaScript

handleRecovered

adeekshith/watomatic · functions/index.js:1375

async function handleRecovered(userId, subscription) {
    logger.info('Subscription recovered', { userId });

    await admin.firestore().collection('users').doc(userId).set({
        subscription: {
            isActive: true,
            recovered: true,
            recoveredAt: admin.firestore.FieldValue.serverTimestamp(),
            inGracePeriod: false,
            onHold: false,
        }
    }, { merge: true });

    // Optional: Send recovery confirmation
}

/**
 * Store orphaned notifications for investigation

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…