Comparing version 0.2.1 to 0.2.2
@@ -50,20 +50,3 @@ "use strict"; | ||
Prompt.prototype.confirm = function (promptKey, text, action) { | ||
var _this = this; | ||
this.add(promptKey, { | ||
matcher: function (input) { return input.text.toLowerCase() === 'yes'; }, | ||
action: action, | ||
creator: function (input) { | ||
_this.setPromptKey(input, promptKey); | ||
input.reply({ | ||
type: 'message', | ||
from: { id: 'MyBot' }, | ||
text: text, | ||
suggestedActions: { actions: ['Yes', 'No'].map(function (choice) { return ({ | ||
type: 'postBack', | ||
title: choice, | ||
value: choice | ||
}); }) } | ||
}); | ||
} | ||
}); | ||
return this.choice(promptKey, text, ['Yes', 'No'], action); | ||
}; | ||
@@ -70,0 +53,0 @@ Prompt.prototype.rule = function () { |
{ | ||
"name": "prague", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "experimental Rx-based bot technology", | ||
@@ -5,0 +5,0 @@ "main": "dist/prague.js", |
@@ -88,20 +88,4 @@ import { CardAction, IChatInput, Activity } from './Chat'; | ||
confirm(promptKey: string, text: string, action: Action<S>) { | ||
this.add(promptKey, { | ||
matcher: (input) => input.text.toLowerCase() === 'yes', // TO DO we can do better than this | ||
action, | ||
creator: (input) => { | ||
this.setPromptKey(input, promptKey); | ||
input.reply({ | ||
type: 'message', | ||
from: { id: 'MyBot' }, | ||
text, | ||
suggestedActions: { actions: ['Yes', 'No'].map<CardAction>(choice => ({ | ||
type: 'postBack', | ||
title: choice, | ||
value: choice | ||
})) } | ||
}); | ||
} | ||
}); | ||
confirm(promptKey: string, text: string, action: Action<S>) { | ||
return this.choice(promptKey, text, ['Yes', 'No'], action); | ||
} | ||
@@ -108,0 +92,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
62626
1173