Skip to content

Commit

Permalink
fix(core.gbapp): Fixing .gbdialog last call error.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed Nov 9, 2020
1 parent e130d63 commit ff20ef2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/core.gbapp/services/GBAPIService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -539,11 +539,14 @@ export class DialogClass {
// TODO: Choose Fuse with country code or consent IP.
}


public async sendFile(step, filename, caption) {
if (filename.indexOf('.md') > -1) {
GBLog.info(`BASIC: Sending the contents of ${filename} markdown to mobile.`);
let md = await this.min.kbService.getAnswerTextByMediaName(this.min.instance.instanceId, filename);
await this.min.conversationalService.sendMarkdownToMobile(this.min, step, null, md);
} else {
GBLog.info(`BASIC: Sending the file ${filename} to mobile.`);
let url = urlJoin(
GBServer.globals.publicAddress,
'kb',
Expand Down
2 changes: 1 addition & 1 deletion packages/core.gbapp/services/GBVMService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ export class GBVMService extends GBService {
async step => {
const cbId = step.activeDialog.state.options.cbId;

if (min.cbMap[cbId] !== null) {
if (min.cbMap[cbId]) {
const promise = min.cbMap[cbId].promise;
delete min.cbMap[cbId];
try {
Expand Down

0 comments on commit ff20ef2

Please sign in to comment.