mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 21:07:59 +00:00
Fix bad behaviours of get_messages
This commit is contained in:
parent
005c24e4bd
commit
229b8df9cd
@ -752,7 +752,8 @@ def parse_messages(
|
||||
try:
|
||||
m.pinned_message = client.get_messages(
|
||||
m.chat.id,
|
||||
message_ids=message.reply_to_msg_id
|
||||
reply_to_message_ids=message.id,
|
||||
replies=0
|
||||
)
|
||||
except FloodWait as e:
|
||||
log.warning("get_messages flood: waiting {} seconds".format(e.x))
|
||||
|
@ -69,7 +69,7 @@ class GetMessages(BaseClient):
|
||||
|
||||
is_iterable = not isinstance(ids, int)
|
||||
ids = list(ids) if is_iterable else [ids]
|
||||
ids = [types.InputMessageID(i) for i in ids]
|
||||
ids = [ids_type(i) for i in ids]
|
||||
|
||||
if isinstance(peer, types.InputPeerChannel):
|
||||
rpc = functions.channels.GetMessages(channel=peer, id=ids)
|
||||
|
Loading…
x
Reference in New Issue
Block a user