-
Notifications
You must be signed in to change notification settings - Fork 109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for "flags2:#" for Layer 140-144 in parser/builder #267
Comments
Anyway, I need this urgently, So I tried to fix it on my own. I won't open PR/fork/whatever. Here are my patched versions of Essential parts for builder:
Essential parts for parser:
I don't know is it really works properly; but generated code looks correct, it compiles and API invocation returns flags2 field:
P.S. For my tl2json to work correctly, you'll need to nuke all of |
I've tried to update Scheme for layer 144 using Telegram Desktop .tl source:
https://github.com/telegramdesktop/tdesktop/blob/c793537d963efe96d0ae7ab30a8b6b262f039151/Telegram/Resources/tl/api.tl#L132
(I have my own script to convert TL to JSON that mtproto-core will eat properly. I'll add my script as attachment here).
However, new scheme now has
flags2:# can_delete_channel:flags2.0?true
which is spelled in JSON as{"name":"flags2","type":"#"},{"name":"can_delete_channel","type":"flags2.0?true"},
but Builder generates:– which is incorrect and gives runtime error. The Parser is also produces incorrect code:
– reading from "flags" and not from "flags2".
Since this is a breaking change, I don't have enough knowledge in mtproto-core internals to fix that myself (I only know how to locally update scheme as I already did that once).
ATTACHMENT: tl2json_v1.htm (works locally in browser) requires
vector#1cb5c415 {t:Type} # [ t ] = Vector t;
to be replaced withvector#1cb5c415 = Vector t;
in source TL before processing.(Side question: how do I rewrite device_model, system_version, app_version, system_lang_code and lang_code with my own user-supplied values at runtime?)
The text was updated successfully, but these errors were encountered: