Poolitzer · GitHub

@lrezende

Copy link Copy Markdown

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.

Leonardo

… effective_chat... well, it's a poll to be answered by multiple uses.

@Poolitzer

Copy link Copy Markdown

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 Copy Markdown

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 Copy Markdown

Member

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

Poolitzer

Copy link Copy Markdown

Member

Choose a reason for hiding this comment

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

LGTM

@Bibo-Joshi

@Bibo-Joshi

Copy link Copy Markdown

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

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators

Aug 17, 2020

Read the original on github.com ↗