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:
Sam 2022-01-11 23:40:37 +08:00 committed by GitHub
parent c7da4a8495
commit de9705f126
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -447,7 +447,7 @@ def start(format: bool = False):
)
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
)
else:

View File

@ -48,6 +48,7 @@ class FutureSalts(TLObject):
def write(self, *args: Any) -> bytes:
b = BytesIO()
b.write(Int(self.ID, False))
b.write(Long(self.req_msg_id))
b.write(Int(self.now))