Skip to content

Commit 38c3658

Browse files
committed
Update endpoint to Clearlog
1 parent beaa4df commit 38c3658

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

packages/messaging/src/helpers/logToFirelog.test.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,7 @@ import { MessagingService } from '../messaging-service';
3131
import { Stub } from '../testing/sinon-types';
3232
import { 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

3936
const 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()]))

packages/messaging/src/helpers/logToFirelog.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@ import {
3636
import { MessagePayloadInternal } from '../interfaces/internal-message-payload';
3737
import { 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

4441
const 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);

0 commit comments

Comments
 (0)