From 7e525922c8a3b09cd33697a195062bf622c55fb8 Mon Sep 17 00:00:00 2001 From: Viktor Oreshkin Date: Sat, 1 Jul 2017 17:55:43 +0300 Subject: [PATCH] Add layer 044 --- l044/README.md | 66 +++++++++++ l044/schema.json | 298 +++++++++++++++++++++++++++++++++++++++++++++++ l044/schema.tl | 12 ++ schema.json | 146 ++++++++++++++++++++++- schema.tl | 10 +- 5 files changed, 528 insertions(+), 4 deletions(-) create mode 100644 l044/README.md create mode 100644 l044/schema.json create mode 100644 l044/schema.tl diff --git a/l044/README.md b/l044/README.md new file mode 100644 index 0000000..d4dc89b --- /dev/null +++ b/l044/README.md @@ -0,0 +1,66 @@ +### Version info +App|Version/Hash|Date +---|---|--- +TDesktop|b23cd9fc11ed93d344b85a02960b2ac658244f1e|28.12.15 +Webogram|4898023ed797d34f7a43dc70229a208e6e78f0e8|14.12.15 + +### Notes +TDesktop's version was different (it also had context bot instead of inline bot) + +```diff +62a63 +> botContextResult#ea0b7eec flags:# hide_url:flags.0?true webpage:WebPage = BotContextResult; +65c66 +< channel#e834ce68 flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true editor:flags.3?true moderator:flags.4?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true id:int access_hash:long title:string username:flags.6?string photo:ChatPhoto date:int version:int restiction_reason:flags.9?string = Chat; +--- +> channel#4b1b7506 flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true editor:flags.3?true moderator:flags.4?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true id:int access_hash:long title:string username:flags.6?string photo:ChatPhoto date:int version:int restriction_reason:flags.9?string = Chat; +126c127 +< config#6cb6e65e date:int expires:int test_mode:Bool this_dc:int dc_options:Vector chat_size_max:int megagroup_size_max:int forwarded_count_max:int online_update_period_ms:int offline_blur_timeout_ms:int offline_idle_timeout_ms:int online_cloud_timeout_ms:int notify_cloud_delay_ms:int notify_default_delay_ms:int chat_big_size:int push_chat_period_ms:int push_chat_limit:int disabled_features:Vector = Config; +--- +> config#06bbc5f8 date:int expires:int test_mode:Bool this_dc:int dc_options:Vector chat_size_max:int megagroup_size_max:int forwarded_count_max:int online_update_period_ms:int offline_blur_timeout_ms:int offline_idle_timeout_ms:int online_cloud_timeout_ms:int notify_cloud_delay_ms:int notify_default_delay_ms:int chat_big_size:int push_chat_period_ms:int push_chat_limit:int saved_gifs_limit:int disabled_features:Vector = Config; +204a206 +> inputBotContextResult#a47850c5 flags:# hide_url:flags.20?true url:string type:flags.0?string title:flags.1?string description:flags.2?string thumb_url:flags.3?string content_url:flags.4?string content_type:flags.4?string w:flags.5?int h:flags.5?int duration:flags.6?int = InputBotContextResult; +226c228,229 +< inputMediaDocument#d184e841 id:InputDocument = InputMedia; +--- +> inputMediaContextBotResult#48720fe8 flags:# media:flags.0?true bot:InputUser url:string query_id:long = InputMedia; +> inputMediaDocument#1a77f29c id:InputDocument caption:string = InputMedia; +232c235 +< inputMediaUploadedDocument#ffe76b78 file:InputFile mime_type:string attributes:Vector = InputMedia; +--- +> inputMediaUploadedDocument#1d89306d file:InputFile mime_type:string attributes:Vector caption:string = InputMedia; +234c237 +< inputMediaUploadedThumbDocument#41481486 file:InputFile thumb:InputFile mime_type:string attributes:Vector = InputMedia; +--- +> inputMediaUploadedThumbDocument#ad613491 file:InputFile thumb:InputFile mime_type:string attributes:Vector caption:string = InputMedia; +242a246 +> inputMessagesFilterGif#ffc86587 = MessagesFilter; +318c322 +< messageMediaDocument#2fda2204 document:Document = MessageMedia; +--- +> messageMediaDocument#f3e02ea8 document:Document caption:string = MessageMedia; +333a338 +> messages.botResults#772740b1 flags:# media:flags.0?true query_id:long next_offset:flags.1?string results:Vector = messages.BotResults; +355a361 +> messages.getContextBotResults#36e7d06c bot:InputUser query:string offset:string = messages.BotResults; +362a369 +> messages.getSavedGifs#83bf3d52 hash:int = messages.SavedGifs; +378a386,388 +> messages.saveGif#327a30cb id:InputDocument unsave:Bool = Bool; +> messages.savedGifs#2e0709a5 hash:int gifs:Vector = messages.SavedGifs; +> messages.savedGifsNotModified#e8025ca2 = messages.SavedGifs; +389a400 +> messages.setContextBotResults#d7f2de0f flags:# media:flags.0?true private:flags.1?true query_id:long results:Vector cache_time:int next_offset:flags.2?string = Bool; +456a468 +> updateBotContextQuery#934bca16 query_id:long user_id:int query:string offset:string = Update; +486a499 +> updateSavedGifs#9375341e = Update; +518c531 +< user#3289b590 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true id:int access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restiction_reason:flags.18?string = User; +--- +> user#cb574c74 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true id:int access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restriction_reason:flags.18?string bot_context_placeholder:flags.19?string = User; +537c550 +< webPageExternal#cf73f207 flags:# url:string display_url:string type:flags.0?string title:flags.1?string description:flags.2?string thumb_url:flags.3?string content_url:flags.4?string w:flags.5?int h:flags.5?int duration:flags.6?int = WebPage; +--- +> webPageExternal#b08fbb93 flags:# url:string display_url:string type:flags.0?string title:flags.1?string description:flags.2?string thumb_url:flags.3?string content_url:flags.4?string content_type:flags.4?string w:flags.5?int h:flags.5?int duration:flags.6?int = WebPage; +``` diff --git a/l044/schema.json b/l044/schema.json new file mode 100644 index 0000000..5eb8f49 --- /dev/null +++ b/l044/schema.json @@ -0,0 +1,298 @@ +{ + "constructors": [ + { + "id": "847885712", + "predicate": "user", + "params": [ + { + "name": "flags", + "type": "#" + }, + { + "name": "self", + "type": "flags.10?true" + }, + { + "name": "contact", + "type": "flags.11?true" + }, + { + "name": "mutual_contact", + "type": "flags.12?true" + }, + { + "name": "deleted", + "type": "flags.13?true" + }, + { + "name": "bot", + "type": "flags.14?true" + }, + { + "name": "bot_chat_history", + "type": "flags.15?true" + }, + { + "name": "bot_nochats", + "type": "flags.16?true" + }, + { + "name": "verified", + "type": "flags.17?true" + }, + { + "name": "restricted", + "type": "flags.18?true" + }, + { + "name": "id", + "type": "int" + }, + { + "name": "access_hash", + "type": "flags.0?long" + }, + { + "name": "first_name", + "type": "flags.1?string" + }, + { + "name": "last_name", + "type": "flags.2?string" + }, + { + "name": "username", + "type": "flags.3?string" + }, + { + "name": "phone", + "type": "flags.4?string" + }, + { + "name": "photo", + "type": "flags.5?UserProfilePhoto" + }, + { + "name": "status", + "type": "flags.6?UserStatus" + }, + { + "name": "bot_info_version", + "type": "flags.14?int" + }, + { + "name": "restiction_reason", + "type": "flags.18?string" + } + ], + "type": "User" + }, + { + "id": "-399192472", + "predicate": "channel", + "params": [ + { + "name": "flags", + "type": "#" + }, + { + "name": "creator", + "type": "flags.0?true" + }, + { + "name": "kicked", + "type": "flags.1?true" + }, + { + "name": "left", + "type": "flags.2?true" + }, + { + "name": "editor", + "type": "flags.3?true" + }, + { + "name": "moderator", + "type": "flags.4?true" + }, + { + "name": "broadcast", + "type": "flags.5?true" + }, + { + "name": "verified", + "type": "flags.7?true" + }, + { + "name": "megagroup", + "type": "flags.8?true" + }, + { + "name": "restricted", + "type": "flags.9?true" + }, + { + "name": "id", + "type": "int" + }, + { + "name": "access_hash", + "type": "long" + }, + { + "name": "title", + "type": "string" + }, + { + "name": "username", + "type": "flags.6?string" + }, + { + "name": "photo", + "type": "ChatPhoto" + }, + { + "name": "date", + "type": "int" + }, + { + "name": "version", + "type": "int" + }, + { + "name": "restiction_reason", + "type": "flags.9?string" + } + ], + "type": "Chat" + }, + { + "id": "-814484985", + "predicate": "webPageExternal", + "params": [ + { + "name": "flags", + "type": "#" + }, + { + "name": "url", + "type": "string" + }, + { + "name": "display_url", + "type": "string" + }, + { + "name": "type", + "type": "flags.0?string" + }, + { + "name": "title", + "type": "flags.1?string" + }, + { + "name": "description", + "type": "flags.2?string" + }, + { + "name": "thumb_url", + "type": "flags.3?string" + }, + { + "name": "content_url", + "type": "flags.4?string" + }, + { + "name": "w", + "type": "flags.5?int" + }, + { + "name": "h", + "type": "flags.5?int" + }, + { + "name": "duration", + "type": "flags.6?int" + } + ], + "type": "WebPage" + }, + { + "id": "-713438005", + "predicate": "foundGif", + "params": [ + { + "name": "webpage", + "type": "WebPage" + } + ], + "type": "FoundGif" + }, + { + "id": "1212395773", + "predicate": "inputMediaGifExternal", + "params": [ + { + "name": "url", + "type": "string" + }, + { + "name": "q", + "type": "string" + } + ], + "type": "InputMedia" + }, + { + "id": "1158290442", + "predicate": "messages.foundGifs", + "params": [ + { + "name": "next_offset", + "type": "int" + }, + { + "name": "results", + "type": "Vector" + } + ], + "type": "messages.FoundGifs" + } + ], + "methods": [ + { + "id": "864953444", + "method": "messages.getDocumentByHash", + "params": [ + { + "name": "sha256", + "type": "bytes" + }, + { + "name": "size", + "type": "int" + }, + { + "name": "mime_type", + "type": "string" + } + ], + "type": "Document" + }, + { + "id": "-1080395925", + "method": "messages.searchGifs", + "params": [ + { + "name": "q", + "type": "string" + }, + { + "name": "offset", + "type": "int" + } + ], + "type": "messages.FoundGifs" + } + ] +} \ No newline at end of file diff --git a/l044/schema.tl b/l044/schema.tl new file mode 100644 index 0000000..631929a --- /dev/null +++ b/l044/schema.tl @@ -0,0 +1,12 @@ +---types--- +// user#22e49072 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true id:int access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int = User; +user#3289b590 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true id:int access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restiction_reason:flags.18?string = User; +// channel#678e9587 flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true editor:flags.3?true moderator:flags.4?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true id:int access_hash:long title:string username:flags.6?string photo:ChatPhoto date:int version:int = Chat; +channel#e834ce68 flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true editor:flags.3?true moderator:flags.4?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true id:int access_hash:long title:string username:flags.6?string photo:ChatPhoto date:int version:int restiction_reason:flags.9?string = Chat; +webPageExternal#cf73f207 flags:# url:string display_url:string type:flags.0?string title:flags.1?string description:flags.2?string thumb_url:flags.3?string content_url:flags.4?string w:flags.5?int h:flags.5?int duration:flags.6?int = WebPage; +foundGif#d579cccb webpage:WebPage = FoundGif; +inputMediaGifExternal#4843b0fd url:string q:string = InputMedia; +messages.foundGifs#450a1c0a next_offset:int results:Vector = messages.FoundGifs; +---functions--- +messages.getDocumentByHash#338e2464 sha256:bytes size:int mime_type:string = Document; +messages.searchGifs#bf9a776b q:string offset:int = messages.FoundGifs; diff --git a/schema.json b/schema.json index 6dc4ddd..fb96dce 100644 --- a/schema.json +++ b/schema.json @@ -4660,7 +4660,7 @@ "type": "MessagesFilter" }, { - "id": "585404530", + "id": "847885712", "predicate": "user", "params": [ { @@ -4699,6 +4699,10 @@ "name": "verified", "type": "flags.17?true" }, + { + "name": "restricted", + "type": "flags.18?true" + }, { "name": "id", "type": "int" @@ -4734,6 +4738,10 @@ { "name": "bot_info_version", "type": "flags.14?int" + }, + { + "name": "restiction_reason", + "type": "flags.18?string" } ], "type": "User" @@ -5165,7 +5173,7 @@ "type": "Peer" }, { - "id": "1737397639", + "id": "-399192472", "predicate": "channel", "params": [ { @@ -5204,6 +5212,10 @@ "name": "megagroup", "type": "flags.8?true" }, + { + "name": "restricted", + "type": "flags.9?true" + }, { "name": "id", "type": "int" @@ -5231,6 +5243,10 @@ { "name": "version", "type": "int" + }, + { + "name": "restiction_reason", + "type": "flags.9?string" } ], "type": "Chat" @@ -6102,6 +6118,98 @@ } ], "type": "help.TermsOfService" + }, + { + "id": "-814484985", + "predicate": "webPageExternal", + "params": [ + { + "name": "flags", + "type": "#" + }, + { + "name": "url", + "type": "string" + }, + { + "name": "display_url", + "type": "string" + }, + { + "name": "type", + "type": "flags.0?string" + }, + { + "name": "title", + "type": "flags.1?string" + }, + { + "name": "description", + "type": "flags.2?string" + }, + { + "name": "thumb_url", + "type": "flags.3?string" + }, + { + "name": "content_url", + "type": "flags.4?string" + }, + { + "name": "w", + "type": "flags.5?int" + }, + { + "name": "h", + "type": "flags.5?int" + }, + { + "name": "duration", + "type": "flags.6?int" + } + ], + "type": "WebPage" + }, + { + "id": "-713438005", + "predicate": "foundGif", + "params": [ + { + "name": "webpage", + "type": "WebPage" + } + ], + "type": "FoundGif" + }, + { + "id": "1212395773", + "predicate": "inputMediaGifExternal", + "params": [ + { + "name": "url", + "type": "string" + }, + { + "name": "q", + "type": "string" + } + ], + "type": "InputMedia" + }, + { + "id": "1158290442", + "predicate": "messages.foundGifs", + "params": [ + { + "name": "next_offset", + "type": "int" + }, + { + "name": "results", + "type": "Vector" + } + ], + "type": "messages.FoundGifs" } ], "methods": [ @@ -8422,6 +8530,40 @@ } ], "type": "help.TermsOfService" + }, + { + "id": "864953444", + "method": "messages.getDocumentByHash", + "params": [ + { + "name": "sha256", + "type": "bytes" + }, + { + "name": "size", + "type": "int" + }, + { + "name": "mime_type", + "type": "string" + } + ], + "type": "Document" + }, + { + "id": "-1080395925", + "method": "messages.searchGifs", + "params": [ + { + "name": "q", + "type": "string" + }, + { + "name": "offset", + "type": "int" + } + ], + "type": "messages.FoundGifs" } ] } \ No newline at end of file diff --git a/schema.tl b/schema.tl index b37ee35..4612229 100644 --- a/schema.tl +++ b/schema.tl @@ -295,7 +295,7 @@ inputStickerSetShortName#861cc8a0 short_name:string = InputStickerSet; stickerSet#cd303b41 flags:# installed:flags.0?true disabled:flags.1?true official:flags.2?true id:long access_hash:long title:string short_name:string count:int hash:int = StickerSet; messages.stickerSet#b60a24a6 set:StickerSet packs:Vector documents:Vector = messages.StickerSet; inputMessagesFilterAudioDocuments#5afbf764 = MessagesFilter; -user#22e49072 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true id:int access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int = User; +user#3289b590 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true id:int access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restiction_reason:flags.18?string = User; botCommand#c27ac8c7 command:string description:string = BotCommand; botInfoEmpty#bb2e37ce = BotInfo; botInfo#9cf585d user_id:int version:int share_text:string description:string commands:Vector = BotInfo; @@ -323,7 +323,7 @@ messageEntityTextUrl#76a6d327 offset:int length:int url:string = MessageEntity; updateShortSentMessage#11f1331c flags:# unread:flags.0?true out:flags.1?true id:int pts:int pts_count:int date:int media:flags.9?MessageMedia entities:flags.7?Vector = Updates; inputPeerChannel#20adaef8 channel_id:int access_hash:long = InputPeer; peerChannel#bddde532 channel_id:int = Peer; -channel#678e9587 flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true editor:flags.3?true moderator:flags.4?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true id:int access_hash:long title:string username:flags.6?string photo:ChatPhoto date:int version:int = Chat; +channel#e834ce68 flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true editor:flags.3?true moderator:flags.4?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true id:int access_hash:long title:string username:flags.6?string photo:ChatPhoto date:int version:int restiction_reason:flags.9?string = Chat; channelForbidden#2d85832c id:int access_hash:long title:string = Chat; channelFull#9e341ddf flags:# can_view_participants:flags.3?true id:int about:string participants_count:flags.0?int admins_count:flags.1?int kicked_count:flags.2?int read_inbox_max_id:int unread_count:int unread_important_count:int chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:ExportedChatInvite bot_info:Vector migrated_from_chat_id:flags.4?int migrated_from_max_id:flags.4?int = ChatFull; messageActionChannelCreate#95d2ac92 title:string = MessageAction; @@ -377,6 +377,10 @@ updateNewStickerSet#688a30aa stickerset:messages.StickerSet = Update; updateStickerSetsOrder#f0dfb451 order:Vector = Update; updateStickerSets#43ae3dec = Update; help.termsOfService#f1ee3e90 text:string = help.TermsOfService; +webPageExternal#cf73f207 flags:# url:string display_url:string type:flags.0?string title:flags.1?string description:flags.2?string thumb_url:flags.3?string content_url:flags.4?string w:flags.5?int h:flags.5?int duration:flags.6?int = WebPage; +foundGif#d579cccb webpage:WebPage = FoundGif; +inputMediaGifExternal#4843b0fd url:string q:string = InputMedia; +messages.foundGifs#450a1c0a next_offset:int results:Vector = messages.FoundGifs; ---functions--- invokeAfterMsg#cb9f372d msg_id:long query:!X = X; invokeAfterMsgs#3dc4b4f0 msg_ids:Vector query:!X = X; @@ -530,3 +534,5 @@ messages.searchGlobal#9e3cacb0 q:string offset_date:int offset_peer:InputPeer of account.reportPeer#ae189d5f peer:InputPeer reason:ReportReason = Bool; messages.reorderStickerSets#9fcfbc30 order:Vector = Bool; help.getTermsOfService#37d78f83 lang_code:string = help.TermsOfService; +messages.getDocumentByHash#338e2464 sha256:bytes size:int mime_type:string = Document; +messages.searchGifs#bf9a776b q:string offset:int = messages.FoundGifs;