From 6850903d1785456d012d804c7adf3bf84e8cecbd Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Thu, 31 Oct 2019 10:43:42 +0100 Subject: [PATCH] Fix get_edit not always returning awaitable, bump v1.10.8 --- telethon/tl/custom/conversation.py | 5 +++-- telethon/version.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/telethon/tl/custom/conversation.py b/telethon/tl/custom/conversation.py index 59117aac..6d5023a7 100644 --- a/telethon/tl/custom/conversation.py +++ b/telethon/tl/custom/conversation.py @@ -222,12 +222,13 @@ class Conversation(ChatGetter): default=None ) + future = self._client.loop.create_future() if earliest_edit and earliest_edit.edit_date.timestamp() > target_date: self._edit_dates[target_id] = earliest_edit.edit_date.timestamp() - return earliest_edit + future.set_result(earliest_edit) + return future # we should always return something we can await # Otherwise the next incoming response will be the one to use - future = self._client.loop.create_future() self._pending_edits[target_id] = future return self._get_result(future, start_time, timeout, self._pending_edits, target_id) diff --git a/telethon/version.py b/telethon/version.py index 2273d056..975b214f 100644 --- a/telethon/version.py +++ b/telethon/version.py @@ -1,3 +1,3 @@ # Versions should comply with PEP440. # This line is parsed in setup.py: -__version__ = '1.10.7' +__version__ = '1.10.8'