Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling beginDialog from inside a ask() handler causes a message to be skipped #1932

Closed
benbrown opened this issue Mar 13, 2020 · 0 comments · Fixed by #1929
Closed

Calling beginDialog from inside a ask() handler causes a message to be skipped #1932

benbrown opened this issue Mar 13, 2020 · 0 comments · Fixed by #1929

Comments

@benbrown
Copy link
Contributor

Due to the way the dialog stack works, calling a bot.beginDialog() inside an ask() handler will cause the next step of the dialog in which the ask() is called to be skipped.

This is because the ask() handler actually fires during the first phase of processing that next step, and when the beginDialog occurs, the process is short circuited. There is currently no way to resume at that step after the child dialog has completed.

One possible solution is to split the message into 2 actual steps, one solely for processing the response to the question and a second to send the following message. This can theoretically be achieved inside the .ask function.

@benbrown benbrown changed the title Callining beginDialog from inside a ask() handler causes a message to be skipped Calling beginDialog from inside a ask() handler causes a message to be skipped Mar 13, 2020
benbrown added a commit that referenced this issue Mar 13, 2020
…the handlers to fire without interferring with the following message in the dialog
@benbrown benbrown mentioned this issue Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant