diff --git a/td/generate/scheme/telegram_api.tl b/td/generate/scheme/telegram_api.tl index a50ca50c4..48df3775e 100644 --- a/td/generate/scheme/telegram_api.tl +++ b/td/generate/scheme/telegram_api.tl @@ -324,7 +324,7 @@ updateContactsReset#7084a7be = Update; updateChannelAvailableMessages#70db6837 channel_id:int available_min_id:int = Update; updateDialogUnreadMark#e16459c3 flags:# unread:flags.0?true peer:DialogPeer = Update; updateUserPinnedMessage#4c43da18 user_id:int id:int = Update; -updateChatPinnedMessage#22893b26 chat_id:int id:int = Update; +updateChatPinnedMessage#e10db349 chat_id:int id:int version:int = Update; updateMessagePoll#aca1657b flags:# poll_id:long poll:flags.0?Poll results:PollResults = Update; updateChatDefaultBannedRights#54c01850 peer:Peer default_banned_rights:ChatBannedRights version:int = Update; @@ -996,6 +996,10 @@ codeSettings#302f59f3 flags:# allow_flashcall:flags.0?true current_number:flags. wallPaperSettings#a12f40b8 flags:# blur:flags.1?true motion:flags.2?true background_color:flags.0?int intensity:flags.3?int = WallPaperSettings; +autoDownloadSettings#d246fd47 flags:# disabled:flags.0?true video_preload_large:flags.1?true audio_preload_next:flags.2?true phonecalls_less_data:flags.3?true photo_size_max:int video_size_max:int file_size_max:int = AutoDownloadSettings; + +account.autoDownloadSettings#63cacf26 low:AutoDownloadSettings medium:AutoDownloadSettings high:AutoDownloadSettings = account.AutoDownloadSettings; + ---functions--- invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X; @@ -1075,6 +1079,8 @@ account.uploadWallPaper#dd853661 file:InputFile mime_type:string settings:WallPa account.saveWallPaper#6c5a5b37 wallpaper:InputWallPaper unsave:Bool settings:WallPaperSettings = Bool; account.installWallPaper#feed5769 wallpaper:InputWallPaper settings:WallPaperSettings = Bool; account.resetWallPapers#bb3b9804 = Bool; +account.getAutoDownloadSettings#56da0b3f = account.AutoDownloadSettings; +account.saveAutoDownloadSettings#76f36233 flags:# low:flags.0?true high:flags.1?true settings:AutoDownloadSettings = Bool; users.getUsers#d91a548 id:Vector = Vector; users.getFullUser#ca30a5b1 id:InputUser = UserFull; @@ -1201,7 +1207,7 @@ messages.updatePinnedMessage#d2aaf7ec flags:# silent:flags.0?true peer:InputPeer messages.sendVote#10ea6184 peer:InputPeer msg_id:int options:Vector = Updates; messages.getPollResults#73bb643b peer:InputPeer msg_id:int = Updates; messages.getOnlines#6e2be050 peer:InputPeer = ChatOnlines; -messages.getStatsURL#83f6c0cd peer:InputPeer = StatsURL; +messages.getStatsURL#812c2ae6 flags:# dark:flags.0?true peer:InputPeer params:string = StatsURL; messages.editChatAbout#def60797 peer:InputPeer about:string = Bool; messages.editChatDefaultBannedRights#a5866b41 peer:InputPeer banned_rights:ChatBannedRights = Updates; @@ -1294,7 +1300,7 @@ phone.acceptCall#3bd2b4a0 peer:InputPhoneCall g_b:bytes protocol:PhoneCallProtoc phone.confirmCall#2efe1722 peer:InputPhoneCall g_a:bytes key_fingerprint:long protocol:PhoneCallProtocol = phone.PhoneCall; phone.receivedCall#17d54f61 peer:InputPhoneCall = Bool; phone.discardCall#78d413a6 peer:InputPhoneCall duration:int reason:PhoneCallDiscardReason connection_id:long = Updates; -phone.setCallRating#1c536a34 peer:InputPhoneCall rating:int comment:string = Updates; +phone.setCallRating#59ead627 flags:# user_initiative:flags.0?true peer:InputPhoneCall rating:int comment:string = Updates; phone.saveCallDebug#277add7e peer:InputPhoneCall debug:DataJSON = Bool; langpack.getLangPack#f2f2330a lang_pack:string lang_code:string = LangPackDifference; diff --git a/td/generate/scheme/telegram_api.tlo b/td/generate/scheme/telegram_api.tlo index 2fc7392ee..41cf69449 100644 Binary files a/td/generate/scheme/telegram_api.tlo and b/td/generate/scheme/telegram_api.tlo differ diff --git a/td/telegram/CallActor.cpp b/td/telegram/CallActor.cpp index adfd078e7..4f488b89d 100644 --- a/td/telegram/CallActor.cpp +++ b/td/telegram/CallActor.cpp @@ -188,7 +188,8 @@ void CallActor::rate_call(int32 rating, string comment, Promise<> promise) { return promise.set_error(Status::Error(400, "Unexpected sendCallRating")); } promise.set_value(Unit()); - auto tl_query = telegram_api::phone_setCallRating(get_input_phone_call("rate_call"), rating, std::move(comment)); + auto tl_query = telegram_api::phone_setCallRating(0, false /*ignored*/, get_input_phone_call("rate_call"), rating, + std::move(comment)); auto query = G()->net_query_creator().create(create_storer(tl_query)); send_with_promise(std::move(query), PromiseCreator::lambda([actor_id = actor_id(this)](NetQueryPtr net_query) { send_closure(actor_id, &CallActor::on_set_rating_query_result, std::move(net_query)); diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index ff9736637..5b6802d02 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -3343,8 +3343,12 @@ class GetStatsUrlQuery : public Td::ResultHandler { dialog_id_ = dialog_id; auto input_peer = td->messages_manager_->get_input_peer(dialog_id, AccessRights::Read); CHECK(input_peer != nullptr); - send_query( - G()->net_query_creator().create(create_storer(telegram_api::messages_getStatsURL(std::move(input_peer))))); + int32 flags = 0; + if (is_dark) { + flags |= telegram_api::messages_getStatsURL::DARK_MASK; + } + send_query(G()->net_query_creator().create(create_storer( + telegram_api::messages_getStatsURL(flags, false /*ignored*/, std::move(input_peer), parameters)))); } void on_result(uint64 id, BufferSlice packet) override { diff --git a/td/telegram/net/MtprotoHeader.cpp b/td/telegram/net/MtprotoHeader.cpp index 7b4872412..47a91bb24 100644 --- a/td/telegram/net/MtprotoHeader.cpp +++ b/td/telegram/net/MtprotoHeader.cpp @@ -21,7 +21,7 @@ class HeaderStorer { } template void store(StorerT &storer) const { - constexpr int32 LAYER = 95; + constexpr int32 LAYER = 96; using td::store; // invokeWithLayer#da9b0d0d {X:Type} layer:int query:!X = X;