Skip to content

Conversation

@lrezende
Copy link
Contributor

It's about pollbot.py example. The poll command was sending the poll to the update.effective_user.id... I think it should be update.effective_chat.id so multiple chat members could answer the poll.

… effective_chat... well, it's a poll to be answered by multiple uses.
@Poolitzer
Copy link
Member

Well the answers are only received on a user basis, not chat one, so the "answer" will be send in a private chat anyway. I dont really see a big gain of your PR but I dont mind it either

@lrezende
Copy link
Contributor Author

I think the pollbot example was meant to have some answers in the same poll_id...

# Close poll after three participants voted
if context.bot_data[poll_id]["answers"] == 3:

If you send the poll to a private chat(user) it will never receive more than one answer.
Correct me if I'm wrong. I'm just starting with ptb and open source contribution.

@Poolitzer
Copy link
Member

No yeah I guess you are right, never thought about running it in a group, but that change is OK.

Copy link
Member

@Poolitzer Poolitzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Bibo-Joshi
Copy link
Member

pytest fails obviously unrelated and we can ignore the examples warning, as there is nothing new in the example. Merging.
Thanks for the contribution @lrezende !

@Bibo-Joshi Bibo-Joshi merged commit dea24bc into python-telegram-bot:master Aug 13, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants