mirror of
https://github.com/pyrogram/pyrogram
synced 2025-09-02 15:25:41 +00:00
Take into account that flags:# could be not always the first argument
For instance, in Layer 91, Poll's flags:# is at the second position. This mess also happened in the past (thanks tg devs) and eventually will be fixed again with the next Layer update, but from now on Pyrogram will be able to correctly generate code even in such cases.
This commit is contained in:
@@ -16,7 +16,6 @@ class {class_name}(Object):
|
||||
|
||||
@staticmethod
|
||||
def read(b: BytesIO, *args) -> "{class_name}":
|
||||
{read_flags}
|
||||
{read_types}
|
||||
return {class_name}({return_arguments})
|
||||
|
||||
@@ -24,6 +23,5 @@ class {class_name}(Object):
|
||||
b = BytesIO()
|
||||
b.write(Int(self.ID, False))
|
||||
|
||||
{write_flags}
|
||||
{write_types}
|
||||
return b.getvalue()
|
||||
|
Reference in New Issue
Block a user