ConversationHandler breaks when bot is also used in Channels#487
Conversation
tsnoam
left a comment
There was a problem hiding this comment.
Hi @Rostgnom
Thanks for your contribution, you are correct - no point in having ConversationHandler for channels.
I left a small comment on the code asking for one small change.
Also, can you be so kind and fix the class documentation and add a note that this handler doesn't support chats?
telegram/ext/conversationhandler.py
Outdated
| return False | ||
|
|
||
| # Ignore messages in channels | ||
| if update.channel_post: |
There was a problem hiding this comment.
Can you please "join" this with the if above?
|
Changed the file as requested. I also added a notion that the ConversationHandler currently does not work in a group chat with multiple users, in that the states do only switch for the user performing the transition/action. Is that clear from what I added to the class doc? |
When using a
ConversationHandlerfor private and group chats in conjunction to having the bot added to a Channel, it will throw a None type exception because it cannot retrieve a chat/user id from the update.I suggest completely ignoring all channel_posts, because the interactivity that a ConversationHandler provides is not useful in channels anyway.