new(kb.gbapp): Whenever the bot is called with no text, start will be called.
This commit is contained in:
parent
e8fc5dff63
commit
d3f0ef4de0
1 changed files with 11 additions and 1 deletions
|
@ -153,9 +153,19 @@ export class AskDialog extends IGBDialog {
|
||||||
|
|
||||||
let text = step.options.query;
|
let text = step.options.query;
|
||||||
text = text.replace(/<([^>]+?)([^>]*?)>(.*?)<\/\1>/gi, '');
|
text = text.replace(/<([^>]+?)([^>]*?)>(.*?)<\/\1>/gi, '');
|
||||||
|
|
||||||
|
// When no text is typed, the start dialog is invoked again
|
||||||
|
// when people type just the @botName in MSTEAMS for example.
|
||||||
|
|
||||||
if (!text) {
|
if (!text) {
|
||||||
throw new Error(`/answer being called with no args query text.`);
|
const startDialog =
|
||||||
|
min.core.getParam(min.instance, 'Start Dialog', null);
|
||||||
|
await GBVMService.callVM(startDialog.toLowerCase(), min, step, this.deployer);
|
||||||
|
|
||||||
|
return step.endDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const locale = step.context.activity.locale;
|
const locale = step.context.activity.locale;
|
||||||
|
|
||||||
// Stops any content on projector.
|
// Stops any content on projector.
|
||||||
|
|
Loading…
Add table
Reference in a new issue