From 29ff3708c46a100601e4f91e9b8a3702c971262a Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Thu, 26 Dec 2019 22:00:41 +0100 Subject: [PATCH] Handle UpdateMessagePoll in _get_response_message (#1355) --- telethon/client/messageparse.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/telethon/client/messageparse.py b/telethon/client/messageparse.py index 290e98cf..5de635ea 100644 --- a/telethon/client/messageparse.py +++ b/telethon/client/messageparse.py @@ -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