This dialog prompts a user for an acronym to be searched in a JavaScript Object. When the user input is less than 4 characters the bot returns:
"I didn't understand. Please try again."
When I provide an acronym that is 4 or more characters the dialog works perfectly. Is there a lower bound for the number of characters in a user response?
bot.dialog('AcronymDialog', [
function (session, arg) {
// Prompts user for an acronym to be searched in an object
builder.Prompts.text(session, "Please provide the Industry Acronym you wish to be translated.");
},
function(session, results) {
//If response is 4 or more characters this is executed
session.send(industryAcronyms[results.response]);
}
]);
Additionally, even if the code in the results function is session.send("Hello, World"); and it never searches the JS objects the response is "I didn't understand. Please try again."