mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 09:26:37 +03:00
Handle UpdateMessagePoll in _get_response_message (#1355)
This commit is contained in:
parent
86bb4b4e6c
commit
29ff3708c4
|
@ -150,6 +150,19 @@ class MessageParseMethods:
|
|||
update.message._finish_init(self, entities, input_chat)
|
||||
sched_to_message[update.message.id] = update.message
|
||||
|
||||
elif isinstance(update, types.UpdateMessagePoll):
|
||||
if request.media.poll.id == update.poll_id:
|
||||
m = types.Message(
|
||||
id=request.id,
|
||||
to_id=utils.get_peer(request.peer),
|
||||
media=types.MessageMediaPoll(
|
||||
poll=update.poll,
|
||||
results=update.results
|
||||
)
|
||||
)
|
||||
m._finish_init(self, entities, input_chat)
|
||||
return m
|
||||
|
||||
if request is None:
|
||||
return id_to_message
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user