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

[BUG] State is advanced for no apparent reason #220

Closed
lakhoune opened this issue Sep 25, 2023 · 0 comments · Fixed by #215
Closed

[BUG] State is advanced for no apparent reason #220

lakhoune opened this issue Sep 25, 2023 · 0 comments · Fixed by #215
Labels
bug Something isn't working

Comments

@lakhoune
Copy link
Member

In the case where we trigger a function call and return, the bot manager will advance the state if there is an empty intent following the last state. This is done in the following line:

} else if (state.getFollowingMessages().get("") != null) {
// check whether bot action needs to be triggered without user input
state = state.getFollowingMessages().get("");
stateMap.put(channel, state);
this.previousStateInConversation.put(channel, state);

This breaks the current implementation of a default path that should be taken if no other intent matches. As an example for the mensa bot: If you want to add a review the bot asks you to either write a comment or say "no". In that case every intent other than rejection should go on that path. And to allow for any intent to be recognized the field is left empty. But the actual behavior is that the state is just skipped and users cannot make any comment
Clipboard - September 24, 2023 6_36 PM

@lakhoune lakhoune added the bug Something isn't working label Sep 25, 2023
@lakhoune lakhoune linked a pull request Sep 25, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant