mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-23 18:37:26 +00:00
Fix core types and compiler (#871)
- Add missing ID to FutureSalts - Have vector flags read to None instead of [] for non-existent lists
This commit is contained in:
parent
c7da4a8495
commit
de9705f126
@ -447,7 +447,7 @@ def start(format: bool = False):
|
|||||||
)
|
)
|
||||||
|
|
||||||
read_types += "\n "
|
read_types += "\n "
|
||||||
read_types += "{} = TLObject.read(b{}) if flags & (1 << {}) else []\n ".format(
|
read_types += "{} = TLObject.read(b{}) if flags & (1 << {}) else None\n ".format(
|
||||||
arg_name, f", {sub_type.title()}" if sub_type in CORE_TYPES else "", index
|
arg_name, f", {sub_type.title()}" if sub_type in CORE_TYPES else "", index
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
@ -48,6 +48,7 @@ class FutureSalts(TLObject):
|
|||||||
|
|
||||||
def write(self, *args: Any) -> bytes:
|
def write(self, *args: Any) -> bytes:
|
||||||
b = BytesIO()
|
b = BytesIO()
|
||||||
|
b.write(Int(self.ID, False))
|
||||||
|
|
||||||
b.write(Long(self.req_msg_id))
|
b.write(Long(self.req_msg_id))
|
||||||
b.write(Int(self.now))
|
b.write(Int(self.now))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user