zeroone2numeral2 / reddit-test

3 stars 1 forks source link

Decorator to decorate entry_point handlers to avoid to enrty a conversation if there's another one going on #180

Closed RememberTheAir closed 3 years ago

RememberTheAir commented 3 years ago

How to do this? Check for "data" in the user's user_data

RememberTheAir commented 3 years ago

PROBLEM: the decorator, if it detects the "data" key in the user_data dict, should send a message and return the current status of the conversation we are currently in

How to do that? Possible solutions:

RememberTheAir commented 3 years ago

The decorator approach doesn't work: as soon as the dispatcher sees that another conversation's entry_point is triggered, it will end the ongoing one and start the triggered conversation

RememberTheAir commented 3 years ago

Possible solution: every conversation should register an handler that will catch all the other conversation's entry_point