Update layer 78.

GitOrigin-RevId: dfef982111d092425e56a400e0cc9f4c9cfcb2c9
This commit is contained in:
levlam 2018-05-08 15:50:33 +03:00
parent 5effa0f662
commit 63695490e0
5 changed files with 24 additions and 4 deletions

View File

@ -833,6 +833,11 @@ messages.foundStickerSets#5108d648 hash:int sets:Vector<StickerSetCovered> = mes
fileHash#6242c773 offset:int limit:int hash:bytes = FileHash;
inputClientProxy#75588b3f address:string port:int = InputClientProxy;
help.proxyDataEmpty#e09e1fb8 expires:int = help.ProxyData;
help.proxyDataPromo#2bf7ee23 expires:int peer:Peer chats:Vector<Chat> users:Vector<User> = help.ProxyData;
inputSecureFileUploaded#3334b0f0 id:long parts:int md5_checksum:string file_hash:bytes secret:bytes = InputSecureFile;
inputSecureFile#5367e5be id:long access_hash:long = InputSecureFile;
@ -884,7 +889,7 @@ help.deepLinkInfo#6a4ee832 flags:# update_app:flags.0?true message:string entiti
invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X;
invokeAfterMsgs#3dc4b4f0 {X:Type} msg_ids:Vector<long> query:!X = X;
initConnection#c7481da6 {X:Type} api_id:int device_model:string system_version:string app_version:string system_lang_code:string lang_pack:string lang_code:string query:!X = X;
initConnection#785188b8 {X:Type} flags:# api_id:int device_model:string system_version:string app_version:string system_lang_code:string lang_pack:string lang_code:string proxy:flags.0?InputClientProxy query:!X = X;
invokeWithLayer#da9b0d0d {X:Type} layer:int query:!X = X;
invokeWithoutUpdates#bf9459b7 {X:Type} query:!X = X;
@ -1092,6 +1097,7 @@ help.getTermsOfService#350170f3 = help.TermsOfService;
help.setBotUpdatesStatus#ec22cfcd pending_updates_count:int message:string = Bool;
help.getCdnConfig#52029342 = CdnConfig;
help.getRecentMeUrls#3dc0f114 referer:string = help.RecentMeUrls;
help.getProxyData#3d7758e1 = help.ProxyData;
help.getDeepLinkInfo#3fedc75f path:string = help.DeepLinkInfo;
channels.readHistory#cc104937 channel:InputChannel max_id:int = Bool;

Binary file not shown.

View File

@ -4942,6 +4942,7 @@ Status Td::set_parameters(td_api::object_ptr<td_api::tdlibParameters> parameters
options.application_version += ", TDLib ";
options.application_version += TDLIB_VERSION;
}
options.proxy = Proxy();
G()->set_mtproto_header(std::make_unique<MtprotoHeader>(options));
state_ = State::Decrypt;

View File

@ -24,9 +24,16 @@ class HeaderStorer {
// invokeWithLayer#da9b0d0d {X:Type} layer:int query:!X = X;
store(static_cast<int32>(0xda9b0d0d), storer);
store(LAYER, storer);
// initConnection#c7481da6 {X:Type} api_id:int device_model:string system_version:string app_version:string
// system_lang_code:string lang_pack:string lang_code:string query:!X = X;
store(static_cast<int32>(0xc7481da6), storer);
// initConnection#785188b8 {X:Type} flags:# api_id:int device_model:string system_version:string app_version:string
// system_lang_code:string lang_pack:string lang_code:string proxy:flags.0?InputClientProxy query:!X = X;
store(static_cast<int32>(0x785188b8), storer);
int32 flags = 0;
/*
if (!is_anonymous && proxy.type() == Proxy::Type::Mtproto) {
flags |= 1 << 0;
}
*/
store(flags, storer);
store(options.api_id, storer);
if (is_anonymous) {
store(Slice("n/a"), storer);
@ -39,6 +46,9 @@ class HeaderStorer {
store(options.system_language_code, storer);
store(string(), storer);
store(string(), storer);
if ((flags & 1) != 0) {
// TODO
}
}
private:

View File

@ -6,6 +6,8 @@
//
#pragma once
#include "td/telegram/net/ConnectionCreator.h"
#include "td/utils/common.h"
#include "td/utils/Slice.h"
@ -19,6 +21,7 @@ class MtprotoHeader {
string device_model;
string system_version;
string application_version;
Proxy proxy;
};
explicit MtprotoHeader(const Options &options)