mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2026-09-07 17:31:57 +00:00
Added ability to upload and send media, and more fixes
Uploading and sending media are different things. Once you have uploaded a media file, you can send it to many users without uploading it again, since you have a handle to the uploaded file. Other fixes include not showing additional data on error messages and not generating correct code for sending bytes
This commit is contained in:
@@ -106,6 +106,15 @@ class BinaryReader:
|
||||
constructor_id = self.read_int(signed=False)
|
||||
clazz = tlobjects.get(constructor_id, None)
|
||||
if clazz is None:
|
||||
# The class was None, but there's still a
|
||||
# chance of it being a manually parsed value like bool!
|
||||
value = constructor_id
|
||||
if value == 0x997275b5: # boolTrue
|
||||
return True
|
||||
elif value == 0xbc799737: # boolFalse
|
||||
return False
|
||||
|
||||
# If there was still no luck, give up
|
||||
raise TypeNotFoundError(constructor_id)
|
||||
|
||||
# Now we need to determine the number of parameters of the class, so we can
|
||||
|
||||
Reference in New Issue
Block a user