Update layer to 81.
GitOrigin-RevId: c6579e02edaff656ab17b3d94695cab8c7960b2d
This commit is contained in:
parent
4a6b1fa4d3
commit
56a2cac6ba
@ -176,7 +176,7 @@ geoPoint#2049d70c long:double lat:double = GeoPoint;
|
||||
|
||||
auth.checkedPhone#811ea28e phone_registered:Bool = auth.CheckedPhone;
|
||||
|
||||
auth.sentCode#5e002502 flags:# phone_registered:flags.0?true type:auth.SentCodeType phone_code_hash:string next_type:flags.1?auth.CodeType timeout:flags.2?int = auth.SentCode;
|
||||
auth.sentCode#38faab5f flags:# phone_registered:flags.0?true type:auth.SentCodeType phone_code_hash:string next_type:flags.1?auth.CodeType timeout:flags.2?int terms_of_service:flags.3?help.TermsOfService = auth.SentCode;
|
||||
|
||||
auth.authorization#cd050916 flags:# tmp_sessions:flags.0?int user:User = auth.Authorization;
|
||||
|
||||
@ -557,7 +557,7 @@ channels.channelParticipantsNotModified#f0173fe9 = channels.ChannelParticipants;
|
||||
|
||||
channels.channelParticipant#d0d9b163 participant:ChannelParticipant users:Vector<User> = channels.ChannelParticipant;
|
||||
|
||||
help.termsOfService#f1ee3e90 text:string = help.TermsOfService;
|
||||
help.termsOfService#780a0310 flags:# popup:flags.0?true id:DataJSON text:string entities:Vector<MessageEntity> min_age_confirm:flags.1?int = help.TermsOfService;
|
||||
|
||||
foundGif#162ecc1f url:string thumb_url:string content_url:string content_type:string w:int h:int = FoundGif;
|
||||
foundGifCached#9c750409 url:string photo:Photo document:Document = FoundGif;
|
||||
@ -721,6 +721,8 @@ webDocumentNoProxy#f9c8bcc6 url:string size:int mime_type:string attributes:Vect
|
||||
inputWebDocument#9bed434d url:string size:int mime_type:string attributes:Vector<DocumentAttribute> = InputWebDocument;
|
||||
|
||||
inputWebFileLocation#c239d686 url:string access_hash:long = InputWebFileLocation;
|
||||
inputWebFileGeoPointLocation#66275a62 geo_point:InputGeoPoint w:int h:int zoom:int scale:int = InputWebFileLocation;
|
||||
inputWebFileGeoMessageLocation#553f32eb peer:InputPeer msg_id:int w:int h:int zoom:int scale:int = InputWebFileLocation;
|
||||
|
||||
upload.webFile#21e753bc size:int mime_type:string file_type:storage.FileType mtime:int bytes:bytes = upload.WebFile;
|
||||
|
||||
@ -840,6 +842,9 @@ 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;
|
||||
|
||||
help.termsOfServiceUpdateEmpty#e3309f7f expires:int = help.TermsOfServiceUpdate;
|
||||
help.termsOfServiceUpdate#28ecf961 expires:int terms_of_service:help.TermsOfService = help.TermsOfServiceUpdate;
|
||||
|
||||
inputSecureFileUploaded#3334b0f0 id:long parts:int md5_checksum:string file_hash:bytes secret:bytes = InputSecureFile;
|
||||
inputSecureFile#5367e5be id:long access_hash:long = InputSecureFile;
|
||||
|
||||
@ -1095,11 +1100,12 @@ help.saveAppLog#6f02f748 events:Vector<InputAppEvent> = Bool;
|
||||
help.getInviteText#4d392343 = help.InviteText;
|
||||
help.getSupport#9cdf08cd = help.Support;
|
||||
help.getAppChangelog#9010ef6f prev_app_version:string = Updates;
|
||||
help.getTermsOfService#8e59b7e7 country_iso2:string = 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.getTermsOfServiceUpdate#2ca51fd1 = help.TermsOfServiceUpdate;
|
||||
help.acceptTermsOfService#ee72f79a id:DataJSON = Bool;
|
||||
help.getDeepLinkInfo#3fedc75f path:string = help.DeepLinkInfo;
|
||||
|
||||
channels.readHistory#cc104937 channel:InputChannel max_id:int = Bool;
|
||||
|
Binary file not shown.
@ -433,32 +433,6 @@ class GetInviteTextQuery : public Td::ResultHandler {
|
||||
}
|
||||
};
|
||||
|
||||
class GetTermsOfServiceQuery : public Td::ResultHandler {
|
||||
Promise<string> promise_;
|
||||
|
||||
public:
|
||||
explicit GetTermsOfServiceQuery(Promise<string> &&promise) : promise_(std::move(promise)) {
|
||||
}
|
||||
|
||||
void send(const string &country_code) {
|
||||
send_query(G()->net_query_creator().create(create_storer(telegram_api::help_getTermsOfService(country_code)),
|
||||
DcId::main(), NetQuery::Type::Common, NetQuery::AuthFlag::Off));
|
||||
}
|
||||
|
||||
void on_result(uint64 id, BufferSlice packet) override {
|
||||
auto result_ptr = fetch_result<telegram_api::help_getTermsOfService>(packet);
|
||||
if (result_ptr.is_error()) {
|
||||
return on_error(id, result_ptr.move_as_error());
|
||||
}
|
||||
|
||||
promise_.set_value(std::move(result_ptr.ok()->text_));
|
||||
}
|
||||
|
||||
void on_error(uint64 id, Status status) override {
|
||||
promise_.set_error(std::move(status));
|
||||
}
|
||||
};
|
||||
|
||||
class GetDeepLinkInfoQuery : public Td::ResultHandler {
|
||||
Promise<td_api::object_ptr<td_api::deepLinkInfo>> promise_;
|
||||
|
||||
@ -3837,34 +3811,6 @@ class GetInviteTextRequest : public RequestActor<string> {
|
||||
}
|
||||
};
|
||||
|
||||
class GetTermsOfServiceRequest : public RequestActor<string> {
|
||||
string country_code_;
|
||||
|
||||
string text_;
|
||||
|
||||
void do_run(Promise<string> &&promise) override {
|
||||
if (get_tries() < 2) {
|
||||
promise.set_value(std::move(text_));
|
||||
return;
|
||||
}
|
||||
|
||||
td->create_handler<GetTermsOfServiceQuery>(std::move(promise))->send(country_code_);
|
||||
}
|
||||
|
||||
void do_set_result(string &&result) override {
|
||||
text_ = std::move(result);
|
||||
}
|
||||
|
||||
void do_send_result() override {
|
||||
send_result(make_tl_object<td_api::text>(text_));
|
||||
}
|
||||
|
||||
public:
|
||||
GetTermsOfServiceRequest(ActorShared<Td> td, uint64 request_id, string country_code)
|
||||
: RequestActor(std::move(td), request_id), country_code_(country_code) {
|
||||
}
|
||||
};
|
||||
|
||||
/** Td **/
|
||||
Td::Td(std::unique_ptr<TdCallback> callback) : callback_(std::move(callback)) {
|
||||
}
|
||||
@ -7011,7 +6957,7 @@ void Td::on_request(uint64 id, const td_api::getInviteText &request) {
|
||||
|
||||
void Td::on_request(uint64 id, td_api::getTermsOfService &request) {
|
||||
CLEAN_INPUT_STRING(request.country_code_);
|
||||
CREATE_REQUEST(GetTermsOfServiceRequest, std::move(request.country_code_));
|
||||
send_error_raw(id, 500, "Unsupported");
|
||||
}
|
||||
|
||||
void Td::on_request(uint64 id, td_api::getDeepLinkInfo &request) {
|
||||
|
@ -18,7 +18,7 @@ class HeaderStorer {
|
||||
}
|
||||
template <class StorerT>
|
||||
void store(StorerT &storer) const {
|
||||
constexpr int32 LAYER = 80;
|
||||
constexpr int32 LAYER = 81;
|
||||
|
||||
using td::store;
|
||||
// invokeWithLayer#da9b0d0d {X:Type} layer:int query:!X = X;
|
||||
|
Reference in New Issue
Block a user