Skip to content
Discussion options

You must be logged in to vote

The Problem: Context Mismatch
In python-telegram-bot, a ConversationHandler tracks the state of a conversation based on a "key". By default, this key is a combination of (Chat ID + User ID).

The Request (Entry Point): The Join Request happens in the Group.

Context: (Group_ID, User_ID)

The bot saves the state WAITING_FOR_VERIFICATION under this key.

The Response: The user replies in a Private Chat (DM).

Context: (Private_Chat_ID, User_ID)

The bot looks for a state under this new key, finds nothing, and ignores the message.

The Solution
You must tell the ConversationHandler to ignore the "Chat ID" and track the state based only on the User ID. This allows the conversation to start in the Gr…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@YePererva
Comment options

@Poolitzer
Comment options

Comment options

You must be logged in to vote
1 reply
@YePererva
Comment options

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