Adapt the rest of the library to layer 119

This commit is contained in:
Lonami Exo
2020-10-01 12:22:55 +02:00
parent 62737c1caf
commit d5e4398ace
14 changed files with 78 additions and 98 deletions

View File

@@ -165,7 +165,7 @@ class Conversation(ChatGetter):
"""
return self._get_message(
message, self._reply_indices, self._pending_replies, timeout,
lambda x, y: x.reply_to_msg_id == y
lambda x, y: x.reply_to and x.reply_to.reply_to_msg_id == y
)
def _get_message(
@@ -374,7 +374,7 @@ class Conversation(ChatGetter):
del self._pending_responses[msg_id]
for msg_id, future in list(self._pending_replies.items()):
if msg_id == response.reply_to_msg_id:
if response.reply_to and msg_id == response.reply_to.reply_to_msg_id:
self._reply_indices[msg_id] = len(self._incoming)
future.set_result(response)
del self._pending_replies[msg_id]