From 7c446699eb47042bad076cf8d532bc51f5d54b1f Mon Sep 17 00:00:00 2001 From: Rodrigo Rodriguez Date: Thu, 16 Sep 2021 09:12:03 -0300 Subject: [PATCH] fix(core.gbapp): Fix bug in Teams handling. --- packages/core.gbapp/services/GBConversationalService.ts | 2 +- packages/core.gbapp/services/GBMinService.ts | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/core.gbapp/services/GBConversationalService.ts b/packages/core.gbapp/services/GBConversationalService.ts index 3ce55113..d82fb035 100644 --- a/packages/core.gbapp/services/GBConversationalService.ts +++ b/packages/core.gbapp/services/GBConversationalService.ts @@ -627,7 +627,7 @@ export class GBConversationalService { } // TODO: Update botlib. - public async routeNLP(step: GBDialogStep, min: GBMinInstance, text: string): Promise { + public async routeNLP(step: GBDialogStep, min: GBMinInstance, text: string): Promise { return false; } public async routeNLP2(step: GBDialogStep, min: GBMinInstance, text: string) { diff --git a/packages/core.gbapp/services/GBMinService.ts b/packages/core.gbapp/services/GBMinService.ts index 3062c598..76477437 100644 --- a/packages/core.gbapp/services/GBMinService.ts +++ b/packages/core.gbapp/services/GBMinService.ts @@ -894,11 +894,9 @@ export class GBMinService { // Skips if the bot is talking. const startDialog = min.core.getParam(min.instance, 'Start Dialog', null); - if (context.activity.type === 'conversationUpdate') - { - GBLog.info(`Bot installed on Teams.`); - } - else if (context.activity.type === 'conversationUpdate' && + if (context.activity.type === 'installationUpdate') { + GBLog.info(`Bot installed on Teams.`); + } else if (context.activity.type === 'conversationUpdate' && context.activity.membersAdded.length > 0) { // Check if a bot or a human participant is being added to the conversation.