From a3e99bb5533fb07f613e2fe1264045ff10880f3e Mon Sep 17 00:00:00 2001 From: Rodrigo Rodriguez Date: Wed, 6 Jul 2022 15:01:58 -0300 Subject: [PATCH] fix(all): CHART and IMAGE from GET HTTP calls. --- .../basic.gblib/services/DialogKeywords.ts | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/packages/basic.gblib/services/DialogKeywords.ts b/packages/basic.gblib/services/DialogKeywords.ts index 501f09f9..f4e9932b 100644 --- a/packages/basic.gblib/services/DialogKeywords.ts +++ b/packages/basic.gblib/services/DialogKeywords.ts @@ -839,14 +839,20 @@ export class DialogKeywords { } else { GBLog.info(`BASIC: Sending the file ${filename} to mobile ${mobile}.`); - const url = urlJoin( - GBServer.globals.publicAddress, - 'kb', - `${this.min.botId}.gbai`, - `${this.min.botId}.gbkb`, - 'assets', - filename - ); + let url; + if (!filename.startsWith("https://")) { + url = urlJoin( + GBServer.globals.publicAddress, + 'kb', + `${this.min.botId}.gbai`, + `${this.min.botId}.gbkb`, + 'assets', + filename + ); + } + else { + url = filename; + } await this.min.conversationalService.sendFile(this.min, step, mobile, url, caption); }