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] 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 });