File tree Expand file tree Collapse file tree 3 files changed +12
-11
lines changed
packages/messaging/src/helpers Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @firebase/messaging ' : patch
3+ ---
4+
5+ The logging endpoint has been updated to ensure proper logging of WebPush entries. This resolves an issue where BigQuery logs were missing WebPush data. The payload structure has also been updated in alignment with the latest logging requirements as specified in go/firelog.
Original file line number Diff line number Diff line change @@ -31,10 +31,7 @@ import { MessagingService } from '../messaging-service';
3131import { Stub } from '../testing/sinon-types' ;
3232import { getFakeMessagingService } from '../testing/fakes/messaging-service' ;
3333
34- const FIRELOG_ENDPOINT = LogModule . _mergeStrings (
35- 'hts/frbslgigp.ogepscmv/ieo/eaylg' ,
36- 'tp:/ieaeogn-agolai.o/1frlglgc/o'
37- ) ;
34+ const LOG_ENDPOINT = 'https://play.google.com/log?format=json_proto3' ;
3835
3936const FCM_TRANSPORT_KEY = LogModule . _mergeStrings (
4037 'AzSCbw63g1R0nCw85jG8' ,
@@ -68,7 +65,7 @@ describe('logToFirelog', () => {
6865
6966 // assert
7067 expect ( fetchStub ) . to . be . calledOnceWith (
71- FIRELOG_ENDPOINT . concat ( '? key=' , FCM_TRANSPORT_KEY ) ,
68+ LOG_ENDPOINT . concat ( '& key=' , FCM_TRANSPORT_KEY ) ,
7269 {
7370 method : 'POST' ,
7471 body : JSON . stringify ( LogModule . _createLogRequest ( [ getFakeLogEvent ( ) ] ) )
Original file line number Diff line number Diff line change @@ -36,10 +36,7 @@ import {
3636import { MessagePayloadInternal } from '../interfaces/internal-message-payload' ;
3737import { MessagingService } from '../messaging-service' ;
3838
39- const FIRELOG_ENDPOINT = _mergeStrings (
40- 'hts/frbslgigp.ogepscmv/ieo/eaylg' ,
41- 'tp:/ieaeogn-agolai.o/1frlglgc/o'
42- ) ;
39+ const LOG_ENDPOINT = 'https://play.google.com/log?format=json_proto3' ;
4340
4441const FCM_TRANSPORT_KEY = _mergeStrings (
4542 'AzSCbw63g1R0nCw85jG8' ,
@@ -97,7 +94,7 @@ export async function _dispatchLogEvents(
9794 do {
9895 try {
9996 response = await fetch (
100- FIRELOG_ENDPOINT . concat ( '? key=' , FCM_TRANSPORT_KEY ) ,
97+ LOG_ENDPOINT . concat ( '& key=' , FCM_TRANSPORT_KEY ) ,
10198 {
10299 method : 'POST' ,
103100 body : JSON . stringify ( logRequest )
@@ -216,7 +213,9 @@ function createAndEnqueueLogEvent(
216213
217214 /* eslint-disable camelcase */
218215 logEvent . event_time_ms = Math . floor ( Date . now ( ) ) . toString ( ) ;
219- logEvent . source_extension_json_proto3 = JSON . stringify ( fcmEvent ) ;
216+ logEvent . source_extension_json_proto3 = JSON . stringify ( {
217+ messaging_client_event : fcmEvent
218+ } ) ;
220219
221220 if ( ! ! productId ) {
222221 logEvent . compliance_data = buildComplianceData ( productId ) ;
You can’t perform that action at this time.
0 commit comments