Skip to content

Commit

Permalink
fix(all): CHART and IMAGE from GET HTTP calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed Jul 6, 2022
1 parent 1de4683 commit a3e99bb
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions packages/basic.gblib/services/DialogKeywords.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit a3e99bb

Please sign in to comment.