Skip to content

Commit

Permalink
Issue : onSelectAction of cancelAction is called before user has a ch…
Browse files Browse the repository at this point in the history
…ance to confirm (microsoft#181)
  • Loading branch information
mpicciolli authored and JasonSowers committed Feb 16, 2018
1 parent e9bab5d commit 07a1029
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Node/core-globalMessageHandlers/bot.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ bot.dialog('AddNumber', [
.triggerAction({matches: /^add$/i})
.cancelAction('CancelAddNumber', 'Operation cancelled', {
matches: /^cancel$/,
onSelectAction: (session, args) => {
onSelectAction: (session, args, next) => {
session.endConversation(`Operation cancelled.`);
next();
},
confirmPrompt: `Are you sure you wish to cancel?`
})
Expand Down

0 comments on commit 07a1029

Please sign in to comment.