From 8138a4a92383ce32f5787a6a69728914427f34a7 Mon Sep 17 00:00:00 2001 From: Joshua Sadlowski Date: Mon, 15 Apr 2024 16:19:23 +0200 Subject: [PATCH 1/2] :bug: Removed false positive duplicate global handler issue --- framework/src/plugins/RouterPlugin.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/src/plugins/RouterPlugin.ts b/framework/src/plugins/RouterPlugin.ts index 7c3278dbf8..2cc0d0ba59 100644 --- a/framework/src/plugins/RouterPlugin.ts +++ b/framework/src/plugins/RouterPlugin.ts @@ -95,7 +95,10 @@ export class RouterPlugin extends Plugin { if (!globalHandlerMap[mappedIntentName]) { globalHandlerMap[mappedIntentName] = []; } - if (!handlerMetadata.hasCondition) { + if ( + !handlerMetadata.hasCondition && + !globalHandlerMap[mappedIntentName].includes(handlerMetadata) + ) { globalHandlerMap[mappedIntentName].push(handlerMetadata); } }); From 491eb9335d172d9c9ea480afbd28fe70ae7d3583 Mon Sep 17 00:00:00 2001 From: Joshua Sadlowski Date: Wed, 8 May 2024 09:28:30 +0200 Subject: [PATCH 2/2] :bug: Fix not awaiting BigQuery addEventFilter --- integrations/analytics-bigquery/src/JovoBigQuery.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/analytics-bigquery/src/JovoBigQuery.ts b/integrations/analytics-bigquery/src/JovoBigQuery.ts index 541cdb709a..0fd81abbe9 100644 --- a/integrations/analytics-bigquery/src/JovoBigQuery.ts +++ b/integrations/analytics-bigquery/src/JovoBigQuery.ts @@ -91,7 +91,7 @@ export class JovoBigQuery { event.timeZone = this.jovo.$request.timeZone as string; } - if (this.config.addEventFilter && !this.config.addEventFilter(this.jovo, event)) { + if (this.config.addEventFilter && !(await this.config.addEventFilter(this.jovo, event))) { if ((this.config.logging as BigQueryLoggingConfig).addEvent) { // eslint-disable-next-line no-console console.log('BigQuery addEvent filtered', { event });