fix(core.gbapp): Fixing .gbdialog last call error.

This commit is contained in:
Rodrigo Rodriguez 2020-11-09 18:29:23 -03:00
parent e130d63a91
commit ff20ef2494
2 changed files with 4 additions and 1 deletions

View file

@ -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',

View file

@ -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 {