Skip to content

Commit

Permalink
Update Pyrogram to 2.1.32.15
Browse files Browse the repository at this point in the history
  • Loading branch information
SpEcHiDe committed Jul 24, 2024
1 parent c0db4cb commit c7a1285
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyrogram/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.

__fork_name__ = "pyrotgfork"
__version__ = "2.1.32.14"
__version__ = "2.1.32.15"
__license__ = "GNU Lesser General Public License v3.0 (LGPL-3.0)"
__copyright__ = "Copyright (C) 2017-present Dan <https://github.com/delivrance>"

Expand Down
7 changes: 4 additions & 3 deletions pyrogram/types/messages_and_media/poll.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
from typing import List, Union, Optional

import pyrogram
from pyrogram import raw, enums, utils
from pyrogram import types
from pyrogram import enums, raw, types, utils
from ..object import Object
from ..update import Update
from .message import Str
Expand Down Expand Up @@ -198,10 +197,12 @@ def _parse_update(client, update: "raw.types.UpdateMessagePoll"):
if update.poll is not None:
return Poll._parse(client, update)

# TODO: FIXME!
results = update.results.results
chosen_option_id = None
correct_option_id = None
options = []
question = ""

for i, result in enumerate(results):
if result.chosen:
Expand All @@ -222,7 +223,7 @@ def _parse_update(client, update: "raw.types.UpdateMessagePoll"):

return Poll(
id=str(update.poll_id),
question="",
question=question,
options=options,
total_voter_count=update.results.total_voters,
is_closed=False,
Expand Down

0 comments on commit c7a1285

Please sign in to comment.