mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 09:26:37 +03:00
Fix get_edit not always returning awaitable, bump v1.10.8
This commit is contained in:
parent
0a3d164806
commit
6850903d17
|
@ -222,12 +222,13 @@ class Conversation(ChatGetter):
|
||||||
default=None
|
default=None
|
||||||
)
|
)
|
||||||
|
|
||||||
|
future = self._client.loop.create_future()
|
||||||
if earliest_edit and earliest_edit.edit_date.timestamp() > target_date:
|
if earliest_edit and earliest_edit.edit_date.timestamp() > target_date:
|
||||||
self._edit_dates[target_id] = earliest_edit.edit_date.timestamp()
|
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
|
# Otherwise the next incoming response will be the one to use
|
||||||
future = self._client.loop.create_future()
|
|
||||||
self._pending_edits[target_id] = future
|
self._pending_edits[target_id] = future
|
||||||
return self._get_result(future, start_time, timeout, self._pending_edits, target_id)
|
return self._get_result(future, start_time, timeout, self._pending_edits, target_id)
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
# Versions should comply with PEP440.
|
# Versions should comply with PEP440.
|
||||||
# This line is parsed in setup.py:
|
# This line is parsed in setup.py:
|
||||||
__version__ = '1.10.7'
|
__version__ = '1.10.8'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user