mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 21:38:04 +00:00
Fix index out of range for new messages
This commit is contained in:
parent
a7650c457d
commit
bfe6632de4
@ -860,6 +860,7 @@ class Client:
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if diff.new_messages:
|
||||||
self.dispatcher.updates.put((
|
self.dispatcher.updates.put((
|
||||||
types.UpdateNewMessage(
|
types.UpdateNewMessage(
|
||||||
message=diff.new_messages[0],
|
message=diff.new_messages[0],
|
||||||
@ -869,6 +870,8 @@ class Client:
|
|||||||
diff.users,
|
diff.users,
|
||||||
diff.chats
|
diff.chats
|
||||||
))
|
))
|
||||||
|
else:
|
||||||
|
self.dispatcher.updates.put((diff.other_updates[0], [], []))
|
||||||
elif isinstance(updates, types.UpdateShort):
|
elif isinstance(updates, types.UpdateShort):
|
||||||
self.dispatcher.updates.put((updates.update, [], []))
|
self.dispatcher.updates.put((updates.update, [], []))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user