Auto-dispatch to dialog based on intent name.
This commit is contained in:
parent
3b6edd4f3a
commit
b7b62c0642
2 changed files with 8 additions and 4 deletions
|
@ -1,6 +1,7 @@
|
|||
## Version 0.0.20
|
||||
|
||||
- NEW: Whatsapp directline client is now working in preview.
|
||||
- NEW: Auto-dispatch to dialog based on intent name.
|
||||
|
||||
## Version 0.0.19
|
||||
|
||||
|
|
|
@ -104,10 +104,13 @@ export class GBConversationalService implements IGBConversationalService {
|
|||
} else if (intent === "ShowSubjectMenu") {
|
||||
session.replaceDialog("/menu");
|
||||
} else {
|
||||
// TODO testar diálogos v2
|
||||
// inclui diálogo
|
||||
session.sendTyping();
|
||||
session.send("Desculpe-me, não encontrei nada a respeito...");
|
||||
try {
|
||||
session.replaceDialog("/" + intent);
|
||||
} catch (error) {
|
||||
logger.trace("error: intent: [" + intent + "] error: [" + error + "]");
|
||||
session.sendTyping();
|
||||
session.send("Desculpe-me, não encontrei nada a respeito...");
|
||||
}
|
||||
}
|
||||
|
||||
cb({ intent, entities }, null);
|
||||
|
|
Loading…
Add table
Reference in a new issue