Skip to content

Commit

Permalink
Merge pull request #10 from Telefonica/fix-prompt-confirm-dlgs#9
Browse files Browse the repository at this point in the history
[[FIX]] Prompt.confirm dialogs are very relaxed recognizing yes/no responses
  • Loading branch information
palmerabollo authored Dec 12, 2016
2 parents e3fc2f8 + 213a4d2 commit b91feee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/botbuilder-ext/patches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ function patchPromptsChoice() {
* w/o breaking backwards compatibility.
*/
function addLocalizedEntityRecognizerYesNoExp() {
(<any>(BotBuilder.EntityRecognizer)).yesExp = /^(1|y|yes|yep|sure|ok|true|s|si|sí|sip|vale)/i;
(<any>(BotBuilder.EntityRecognizer)).noExp = /^(2|n|no|nope|not|false|nop)/i;
(<any>(BotBuilder.EntityRecognizer)).yesExp = /^(1|y|yes|yep|sure|of course|ok|true|s|si|sí|sip|vale)(\W|$)/i;
(<any>(BotBuilder.EntityRecognizer)).noExp = /^(2|n|no|nope|not|false|nop)(\W|$)/i;
}

// Apply all the patches when loading this module
Expand Down

0 comments on commit b91feee

Please sign in to comment.