From c9d2499e315665d846283f5493f5f43471461f0d Mon Sep 17 00:00:00 2001 From: "me@rodrigorodriguez.com" Date: Thu, 3 Oct 2024 14:44:48 -0300 Subject: [PATCH] new(basic.gblib): SEND FILE pdf as temporary images. --- .../services/GBConversationalService.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/core.gbapp/services/GBConversationalService.ts b/packages/core.gbapp/services/GBConversationalService.ts index 79d2732b..a43121d1 100644 --- a/packages/core.gbapp/services/GBConversationalService.ts +++ b/packages/core.gbapp/services/GBConversationalService.ts @@ -1252,14 +1252,17 @@ export class GBConversationalService { } analytics.createMessage(min.instance.instanceId, conversation, null, text); } - console.log(GBUtil.toYAML(step)); - if (step && step.IsRevoked) { - await min.whatsAppDirectLine.sendToDevice(user.userSystemId, - text); - - } else { + + try{ + // TODO: Remove MS BOT Framework and put GBNative. + await step.context.sendActivity(text); + + } catch { + await min.whatsAppDirectLine.sendToDevice(user.userSystemId, + text); + } } public async broadcast(min: GBMinInstance, message: string) {