From 6cf6d496342e636f0d65e5835e1d6ed6cfc180fd Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sun, 28 Oct 2018 17:24:05 +0100 Subject: [PATCH] Update utils to accommodate changes on get_messages --- pyrogram/client/ext/utils.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pyrogram/client/ext/utils.py b/pyrogram/client/ext/utils.py index 94be83f5..492fbeb0 100644 --- a/pyrogram/client/ext/utils.py +++ b/pyrogram/client/ext/utils.py @@ -638,7 +638,8 @@ def parse_messages( while True: try: m.reply_to_message = client.get_messages( - m.chat.id, message.reply_to_msg_id, + m.chat.id, + reply_to_message_ids=message.id, replies=replies - 1 ) except FloodWait as e: @@ -750,8 +751,8 @@ def parse_messages( while True: try: m.pinned_message = client.get_messages( - m.chat.id, message.reply_to_msg_id, - replies=0 + m.chat.id, + message_ids=message.reply_to_msg_id ) except FloodWait as e: log.warning("get_messages flood: waiting {} seconds".format(e.x)) @@ -948,7 +949,7 @@ def parse_chat_full( if full_chat.pinned_msg_id: parsed_chat.pinned_message = client.get_messages( parsed_chat.id, - full_chat.pinned_msg_id + message_ids=full_chat.pinned_msg_id ) if isinstance(full_chat.exported_invite, types.ChatInviteExported):