mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-09 05:19:41 +00:00
Minor improvement to updates handling
Now the updates thread won't start unless you add, at least, one updates handler. Also, if the TcpClient was receiving (i.e., from an update), it will let the update to be received first instead of crashing
This commit is contained in:
@@ -123,9 +123,8 @@ def parse_message_entities(msg):
|
||||
# Second case, both inside: so*me_th*in_g.
|
||||
# In this case, the current entity length is decreased by one,
|
||||
# and all the subentities offset and length decrease 1
|
||||
elif (subentity.offset > entity.offset and
|
||||
subentity.offset < entity.offset + entity.length and
|
||||
subentity.offset + subentity.length > entity.offset + entity.length):
|
||||
elif (entity.offset < subentity.offset < entity.offset + entity.length and
|
||||
subentity.offset + subentity.length > entity.offset + entity.length):
|
||||
entity.length -= 1
|
||||
subentity.offset -= 1
|
||||
subentity.length -= 1
|
||||
|
Reference in New Issue
Block a user