Skip to content

Multiple MessageHandlers conflict in the same ConversationHandler #4191

Answered by tomasjur
tomasjur asked this question in Q&A
Discussion options

You must be logged in to vote

Until there is a fix for this, I temporarily edited the conversationhandler.py code on lines 780 to 809.

  1. Switched if (line 781) with another if (line 793) places to first check for states, not entry points.
  2. Changed if state is None or self.allow_reentry: (line 781) to if (state is None or self.allow_reentry) and handler is None:.
  3. Commented out (or completely remove) else: return None (line 808) because we want to move to entry points if we don't find the stage or fallback needed.

Whoever will face the same issue and read this, use this workaround at your own risk. Also, there is a smarter way by rewriting this part of the code but I already spent more than needed time on this particular…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@tomasjur
Comment options

@Bibo-Joshi
Comment options

@tomasjur
Comment options

Answer selected by tomasjur
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants