mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
Fix UpdateShort from socket was not unboxed
This was causing UpdateShorts to be sent to Raw handlers, which in turn broke things like QR login. Should fix #3922.
This commit is contained in:
parent
935be9dd6e
commit
a66df977f7
|
@ -392,7 +392,9 @@ class MessageBox:
|
||||||
seq_start = getattr(updates, 'seq_start', None) or seq
|
seq_start = getattr(updates, 'seq_start', None) or seq
|
||||||
users = getattr(updates, 'users', None) or []
|
users = getattr(updates, 'users', None) or []
|
||||||
chats = getattr(updates, 'chats', None) or []
|
chats = getattr(updates, 'chats', None) or []
|
||||||
updates = getattr(updates, 'updates', None) or [updates]
|
|
||||||
|
# updateShort is the only update which cannot be dispatched directly but doesn't have 'updates' field
|
||||||
|
updates = getattr(updates, 'updates', None) or [updates.update if isinstance(updates, tl.UpdateShort) else updates]
|
||||||
|
|
||||||
for u in updates:
|
for u in updates:
|
||||||
u._self_outgoing = self_outgoing
|
u._self_outgoing = self_outgoing
|
||||||
|
|
Loading…
Reference in New Issue
Block a user