Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant