INNER CODE UNIT · JavaScript

storeOrphanedNotification

adeekshith/watomatic · functions/index.js:1394

async function storeOrphanedNotification(notificationType, purchaseToken, subscription, eventTimeMillis) {
    await admin.firestore().collection('orphaned_notifications').add({
        notificationType,
        purchaseToken,
        subscription,
        eventTimeMillis,
        timestamp: admin.firestore.FieldValue.serverTimestamp(),
    });
}

// =============================================================================
// Scheduled Subscription Refresh
// =============================================================================

/**
 * Scheduled function to refresh expiring subscriptions
 * Runs every 6 hours to catch any missed RTDN events
 *

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…