From 2fd360e495a0a8366f1417ed021f57d12ca4d21d Mon Sep 17 00:00:00 2001 From: Mohit Tejani Date: Mon, 5 Feb 2024 11:50:41 +0530 Subject: [PATCH] fix: telemetry condition to add query param --- src/core/components/telemetry_manager.js | 12 ++---------- src/core/constants/operations.js | 3 --- src/core/endpoints/subscriptionUtils/handshake.js | 2 +- .../endpoints/subscriptionUtils/receiveMessages.js | 2 +- 4 files changed, 4 insertions(+), 15 deletions(-) diff --git a/src/core/components/telemetry_manager.js b/src/core/components/telemetry_manager.js index 0576c2f8e..474b5f206 100644 --- a/src/core/components/telemetry_manager.js +++ b/src/core/components/telemetry_manager.js @@ -33,11 +33,7 @@ export default class { } startLatencyMeasure(operationType, identifier) { - if ( - operationType === operationConstants.PNSubscribeOperation || - operationConstants.PNReceiveMessagesOperation || - !identifier - ) { + if (operationType === operationConstants.PNSubscribeOperation || !identifier) { return; } @@ -45,11 +41,7 @@ export default class { } stopLatencyMeasure(operationType, identifier) { - if ( - operationType === operationConstants.PNSubscribeOperation || - operationConstants.PNReceiveMessagesOperation || - !identifier - ) { + if (operationType === operationConstants.PNSubscribeOperation || !identifier) { return; } diff --git a/src/core/constants/operations.js b/src/core/constants/operations.js index 7d1ffcaca..5e1223f39 100644 --- a/src/core/constants/operations.js +++ b/src/core/constants/operations.js @@ -86,7 +86,4 @@ export default { PNAccessManagerRevokeToken: 'PNAccessManagerRevokeToken', // - // subscription utilities - PNHandshakeOperation: 'PNHandshakeOperation', - PNReceiveMessagesOperation: 'PNReceiveMessagesOperation', }; diff --git a/src/core/endpoints/subscriptionUtils/handshake.js b/src/core/endpoints/subscriptionUtils/handshake.js index 68487c68d..0198f82bf 100644 --- a/src/core/endpoints/subscriptionUtils/handshake.js +++ b/src/core/endpoints/subscriptionUtils/handshake.js @@ -2,7 +2,7 @@ import operationConstants from '../../constants/operations'; import utils from '../../utils'; const endpoint = { - getOperation: () => operationConstants.PNHandshakeOperation, + getOperation: () => operationConstants.PNSubscribeOperation, validateParams: (_, params) => { if (!params?.channels && !params?.channelGroups) { diff --git a/src/core/endpoints/subscriptionUtils/receiveMessages.js b/src/core/endpoints/subscriptionUtils/receiveMessages.js index c85a52ab5..46f4adede 100644 --- a/src/core/endpoints/subscriptionUtils/receiveMessages.js +++ b/src/core/endpoints/subscriptionUtils/receiveMessages.js @@ -2,7 +2,7 @@ import operationConstants from '../../constants/operations'; import utils from '../../utils'; const endpoint = { - getOperation: () => operationConstants.PNReceiveMessagesOperation, + getOperation: () => operationConstants.PNSubscribeOperation, validateParams: (_, params) => { if (!params?.channels && !params?.channelGroups) {