From 3d7c6802b6a0243867d667b8f0d74b6b6691d219 Mon Sep 17 00:00:00 2001 From: Abhishek urs C J <43801187+Abhishk123@users.noreply.github.com> Date: Mon, 28 Oct 2024 18:12:35 +0530 Subject: [PATCH 1/2] Update clearEventHandler.js --- src/pubsub/handlers/clearEventHandler.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/pubsub/handlers/clearEventHandler.js b/src/pubsub/handlers/clearEventHandler.js index 5788890f..a929d86e 100644 --- a/src/pubsub/handlers/clearEventHandler.js +++ b/src/pubsub/handlers/clearEventHandler.js @@ -29,6 +29,16 @@ export default class clearEventHandler extends BaseHandler { async handle(message) { const eventInvokerInfo = new EventInvocation(); + let sdkType; + if (!message.params.event.includes('_')) { + sdkType = CONSTANTS.CORE.toLowerCase(); + } else { + sdkType = message.params.event.split('_')[0].toLowerCase(); + } + if (message.action != null && message.action != 'NA') { + sdkType = message.action; + process.env.SDK_TYPE = sdkType; + } try { const validationReport = eventInvokerInfo.clearEventListeners(message.params.event); return JSON.stringify({ report: validationReport }); From c9c5692aa54aa9226372fa8b675a3a559aef7282 Mon Sep 17 00:00:00 2001 From: Abhishek urs C J <43801187+Abhishk123@users.noreply.github.com> Date: Tue, 29 Oct 2024 11:57:18 +0530 Subject: [PATCH 2/2] Update clearEventHandler.js --- src/pubsub/handlers/clearEventHandler.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pubsub/handlers/clearEventHandler.js b/src/pubsub/handlers/clearEventHandler.js index a929d86e..94082477 100644 --- a/src/pubsub/handlers/clearEventHandler.js +++ b/src/pubsub/handlers/clearEventHandler.js @@ -30,9 +30,7 @@ export default class clearEventHandler extends BaseHandler { async handle(message) { const eventInvokerInfo = new EventInvocation(); let sdkType; - if (!message.params.event.includes('_')) { - sdkType = CONSTANTS.CORE.toLowerCase(); - } else { + if (message.params && message.params.event && message.params.event.includes('_')) { sdkType = message.params.event.split('_')[0].toLowerCase(); } if (message.action != null && message.action != 'NA') {