fix(basic.gblib): HEAR AS now shows domain items to user when validation fails.
This commit is contained in:
parent
1517f4f0c3
commit
d20c2f7742
2 changed files with 22 additions and 13 deletions
|
@ -1093,7 +1093,7 @@ export class DialogKeywords {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (result === null) {
|
if (result === null) {
|
||||||
await this.talk({ pid, text: `Escolha por favor um dos itens sugeridos.` });
|
await this.talk({ pid, text: `Escolha por favor um dos itens sugeridos (${args.join(',')}).` });
|
||||||
return await this.hear({ pid, kind, args });
|
return await this.hear({ pid, kind, args });
|
||||||
}
|
}
|
||||||
} else if (kind === 'language') {
|
} else if (kind === 'language') {
|
||||||
|
|
|
@ -1212,6 +1212,7 @@ export class GBMinService {
|
||||||
}
|
}
|
||||||
|
|
||||||
private async handleUploads(min, step, user, params, autoSave) {
|
private async handleUploads(min, step, user, params, autoSave) {
|
||||||
|
|
||||||
// Prepare Promises to download each attachment and then execute each Promise.
|
// Prepare Promises to download each attachment and then execute each Promise.
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
@ -1228,7 +1229,6 @@ export class GBMinService {
|
||||||
// In case of not having HEAR activated before, it is
|
// In case of not having HEAR activated before, it is
|
||||||
// a upload with no Dialog, so run Auto Save to .gbdrive.
|
// a upload with no Dialog, so run Auto Save to .gbdrive.
|
||||||
|
|
||||||
if (!min.cbMap[user.userId] && autoSave) {
|
|
||||||
const t = new SystemKeywords();
|
const t = new SystemKeywords();
|
||||||
GBLog.info(`BASIC (${min.botId}): Upload done for ${attachmentData.fileName}.`);
|
GBLog.info(`BASIC (${min.botId}): Upload done for ${attachmentData.fileName}.`);
|
||||||
const handle = WebAutomationServices.cyrb53(min.botId + attachmentData.fileName);
|
const handle = WebAutomationServices.cyrb53(min.botId + attachmentData.fileName);
|
||||||
|
@ -1241,6 +1241,9 @@ export class GBMinService {
|
||||||
};
|
};
|
||||||
|
|
||||||
GBServer.globals.files[handle] = gbfile;
|
GBServer.globals.files[handle] = gbfile;
|
||||||
|
|
||||||
|
if (!min.cbMap[user.userId] && autoSave) {
|
||||||
|
|
||||||
const result = await t['internalAutoSave']({ min: min, handle: handle });
|
const result = await t['internalAutoSave']({ min: min, handle: handle });
|
||||||
await min.conversationalService.sendText(
|
await min.conversationalService.sendText(
|
||||||
min,
|
min,
|
||||||
|
@ -1250,6 +1253,12 @@ export class GBMinService {
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return gbfile;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
await this.sendActivity('Error uploading file. Please,start again.');
|
await this.sendActivity('Error uploading file. Please,start again.');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue