INNER CODE UNIT · JavaScript

pubsubMessageId

adeekshith/watomatic · functions/index.js:866

            const pubsubMessageId = event.data.message.messageId; // Only for logging
            const decodedData = Buffer.from(messageData, 'base64').toString('utf-8');
            const notification = JSON.parse(decodedData);

            logger.info('Received Play Store notification', { notification, pubsubMessageId });

            // Extract notification details
            const { subscriptionNotification, testNotification, packageName, eventTimeMillis } = notification;

            // Handle test notifications
            if (testNotification) {
                logger.info('Received test notification', { version: testNotification.version });
                // Use pubsubMessageId for test notifications since they don't have the same structure
                const testKey = `test_${pubsubMessageId}`;
                await admin.firestore()
                    .collection('processed_notifications')
                    .doc(testKey)
                    .set({

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…