mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-11-11 19:40:36 +00:00
Don't distinguish between str and bytes when serializing
This makes it easier to use some requests like ReqPqRequest which needs a string of bytes, not a valid utf-8 string per se.
This commit is contained in:
@@ -493,7 +493,7 @@ class TLGenerator:
|
||||
builder.write("struct.pack('<d', {})".format(name))
|
||||
|
||||
elif 'string' == arg.type:
|
||||
builder.write('TLObject.serialize_string({})'.format(name))
|
||||
builder.write('TLObject.serialize_bytes({})'.format(name))
|
||||
|
||||
elif 'Bool' == arg.type:
|
||||
# 0x997275b5 if boolean else 0xbc799737
|
||||
|
||||
Reference in New Issue
Block a user