diff --git a/framework/src/plugins/RouterPlugin.ts b/framework/src/plugins/RouterPlugin.ts index 7c3278dbf..2cc0d0ba5 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); } }); diff --git a/integrations/analytics-bigquery/src/JovoBigQuery.ts b/integrations/analytics-bigquery/src/JovoBigQuery.ts index 541cdb709..0fd81abbe 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 });