mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-02 13:34:51 +00:00
Fix index out of range for new messages
This commit is contained in:
parent
a7650c457d
commit
bfe6632de4
1 changed files with 12 additions and 9 deletions
|
|
@ -860,15 +860,18 @@ class Client:
|
|||
)
|
||||
)
|
||||
|
||||
self.dispatcher.updates.put((
|
||||
types.UpdateNewMessage(
|
||||
message=diff.new_messages[0],
|
||||
pts=updates.pts,
|
||||
pts_count=updates.pts_count
|
||||
),
|
||||
diff.users,
|
||||
diff.chats
|
||||
))
|
||||
if diff.new_messages:
|
||||
self.dispatcher.updates.put((
|
||||
types.UpdateNewMessage(
|
||||
message=diff.new_messages[0],
|
||||
pts=updates.pts,
|
||||
pts_count=updates.pts_count
|
||||
),
|
||||
diff.users,
|
||||
diff.chats
|
||||
))
|
||||
else:
|
||||
self.dispatcher.updates.put((diff.other_updates[0], [], []))
|
||||
elif isinstance(updates, types.UpdateShort):
|
||||
self.dispatcher.updates.put((updates.update, [], []))
|
||||
except Exception as e:
|
||||
|
|
|
|||
Loading…
Reference in a new issue