From e659ae483ca77f04c49a934952acd6dc70fd64a6 Mon Sep 17 00:00:00 2001 From: levlam Date: Mon, 8 Jul 2024 13:34:56 +0300 Subject: [PATCH] Update layer to 185. --- td/generate/scheme/telegram_api.tl | 36 ++++++++++++++++++++++------ td/telegram/AnimationsManager.cpp | 2 +- td/telegram/InlineQueriesManager.cpp | 2 +- td/telegram/MediaArea.cpp | 4 ++++ td/telegram/MessageContent.cpp | 7 ++++-- td/telegram/NotificationManager.cpp | 6 ++--- td/telegram/Payments.cpp | 6 ++--- td/telegram/Premium.cpp | 4 ++-- td/telegram/TopDialogCategory.cpp | 2 ++ td/telegram/TopDialogManager.cpp | 7 +++--- td/telegram/UpdatesManager.cpp | 1 + td/telegram/UserManager.cpp | 7 +++--- td/telegram/Version.h | 2 +- td/telegram/VideoNotesManager.cpp | 2 +- td/telegram/VideosManager.cpp | 2 +- 15 files changed, 62 insertions(+), 28 deletions(-) diff --git a/td/generate/scheme/telegram_api.tl b/td/generate/scheme/telegram_api.tl index 5b2e895f6..530c5520e 100644 --- a/td/generate/scheme/telegram_api.tl +++ b/td/generate/scheme/telegram_api.tl @@ -50,6 +50,7 @@ inputPhoneContact#f392b7f4 client_id:long phone:string first_name:string last_na inputFile#f52ff27f id:long parts:int name:string md5_checksum:string = InputFile; inputFileBig#fa4f0bb5 id:long parts:int name:string = InputFile; +inputFileStoryDocument#62dc8b48 id:InputDocument = InputFile; inputMediaEmpty#9664f57f = InputMedia; inputMediaUploadedPhoto#1e287d04 flags:# spoiler:flags.2?true file:InputFile stickers:flags.0?Vector ttl_seconds:flags.1?int = InputMedia; @@ -107,7 +108,7 @@ storage.fileMp4#b3cea0e4 = storage.FileType; storage.fileWebp#1081464c = storage.FileType; userEmpty#d3bc4b7a id:long = User; -user#215c4438 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 min:flags.20?true bot_inline_geo:flags.21?true support:flags.23?true scam:flags.24?true apply_min_photo:flags.25?true fake:flags.26?true bot_attach_menu:flags.27?true premium:flags.28?true attach_menu_enabled:flags.29?true flags2:# bot_can_edit:flags2.1?true close_friend:flags2.2?true stories_hidden:flags2.3?true stories_unavailable:flags2.4?true contact_require_premium:flags2.10?true bot_business:flags2.11?true id:long 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?Vector bot_inline_placeholder:flags.19?string lang_code:flags.22?string emoji_status:flags.30?EmojiStatus usernames:flags2.0?Vector stories_max_id:flags2.5?int color:flags2.8?PeerColor profile_color:flags2.9?PeerColor = User; +user#83314fca 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 min:flags.20?true bot_inline_geo:flags.21?true support:flags.23?true scam:flags.24?true apply_min_photo:flags.25?true fake:flags.26?true bot_attach_menu:flags.27?true premium:flags.28?true attach_menu_enabled:flags.29?true flags2:# bot_can_edit:flags2.1?true close_friend:flags2.2?true stories_hidden:flags2.3?true stories_unavailable:flags2.4?true contact_require_premium:flags2.10?true bot_business:flags2.11?true bot_has_main_app:flags2.13?true id:long 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?Vector bot_inline_placeholder:flags.19?string lang_code:flags.22?string emoji_status:flags.30?EmojiStatus usernames:flags2.0?Vector stories_max_id:flags2.5?int color:flags2.8?PeerColor profile_color:flags2.9?PeerColor bot_active_users:flags2.12?int = User; userProfilePhotoEmpty#4f11bae1 = UserProfilePhoto; userProfilePhoto#82d1f706 flags:# has_video:flags.0?true personal:flags.2?true photo_id:long stripped_thumb:flags.1?bytes dc_id:int = UserProfilePhoto; @@ -204,6 +205,7 @@ messageActionGiveawayResults#2a9fadc5 winners_count:int unclaimed_count:int = Me messageActionBoostApply#cc02aa6d boosts:int = MessageAction; messageActionRequestedPeerSentMe#93b31848 button_id:int peers:Vector = MessageAction; messageActionPaymentRefunded#41b3e202 flags:# peer:Peer currency:string total_amount:long payload:flags.0?bytes charge:PaymentCharge = MessageAction; +messageActionGiftStars#45d5b021 flags:# currency:string amount:long stars:long crypto_currency:flags.0?string crypto_amount:flags.0?long transaction_id:flags.1?string = MessageAction; dialog#d58a08c6 flags:# pinned:flags.2?true unread_mark:flags.3?true view_forum_as_messages:flags.6?true peer:Peer top_message:int read_inbox_max_id:int read_outbox_max_id:int unread_count:int unread_mentions_count:int unread_reactions_count:int notify_settings:PeerNotifySettings pts:flags.0?int draft:flags.1?DraftMessage folder_id:flags.4?int ttl_period:flags.5?int = Dialog; dialogFolder#71bd134c flags:# pinned:flags.2?true folder:Folder peer:Peer top_message:int unread_muted_peers_count:int unread_unmuted_peers_count:int unread_muted_messages_count:int unread_unmuted_messages_count:int = Dialog; @@ -592,7 +594,7 @@ accountDaysTTL#b8d0afdf days:int = AccountDaysTTL; documentAttributeImageSize#6c37c15c w:int h:int = DocumentAttribute; documentAttributeAnimated#11b58939 = DocumentAttribute; documentAttributeSticker#6319d612 flags:# mask:flags.1?true alt:string stickerset:InputStickerSet mask_coords:flags.0?MaskCoords = DocumentAttribute; -documentAttributeVideo#d38ff1c2 flags:# round_message:flags.0?true supports_streaming:flags.1?true nosound:flags.3?true duration:double w:int h:int preload_prefix_size:flags.2?int = DocumentAttribute; +documentAttributeVideo#17399fad flags:# round_message:flags.0?true supports_streaming:flags.1?true nosound:flags.3?true duration:double w:int h:int preload_prefix_size:flags.2?int video_start_ts:flags.4?double = DocumentAttribute; documentAttributeAudio#9852f9c6 flags:# voice:flags.10?true duration:int title:flags.0?string performer:flags.1?string waveform:flags.2?bytes = DocumentAttribute; documentAttributeFilename#15590068 file_name:string = DocumentAttribute; documentAttributeHasStickers#9801d2f7 = DocumentAttribute; @@ -653,7 +655,7 @@ messages.stickerSetNotModified#d3f924eb = messages.StickerSet; botCommand#c27ac8c7 command:string description:string = BotCommand; -botInfo#8f300b57 flags:# user_id:flags.0?long description:flags.1?string description_photo:flags.4?Photo description_document:flags.5?Document commands:flags.2?Vector menu_button:flags.3?BotMenuButton = BotInfo; +botInfo#8f300b57 flags:# has_preview_medias:flags.6?true user_id:flags.0?long description:flags.1?string description_photo:flags.4?Photo description_document:flags.5?Document commands:flags.2?Vector menu_button:flags.3?BotMenuButton = BotInfo; keyboardButton#a2fa4880 text:string = KeyboardButton; keyboardButtonUrl#258aff05 text:string url:string = KeyboardButton; @@ -813,6 +815,7 @@ topPeerCategoryChannels#161d9628 = TopPeerCategory; topPeerCategoryPhoneCalls#1e76a78c = TopPeerCategory; topPeerCategoryForwardUsers#a8406ca9 = TopPeerCategory; topPeerCategoryForwardChats#fbeec0f0 = TopPeerCategory; +topPeerCategoryBotsApp#fd9e7bec = TopPeerCategory; topPeerCategoryPeers#fb834291 category:TopPeerCategory count:int peers:Vector = TopPeerCategoryPeers; @@ -1477,7 +1480,7 @@ attachMenuPeerTypeBroadcast#7bfbdefc = AttachMenuPeerType; inputInvoiceMessage#c5b56859 peer:InputPeer msg_id:int = InputInvoice; inputInvoiceSlug#c326caef slug:string = InputInvoice; inputInvoicePremiumGiftCode#98986c0d purpose:InputStorePaymentPurpose option:PremiumGiftCodeOption = InputInvoice; -inputInvoiceStars#1da33ad8 option:StarsTopupOption = InputInvoice; +inputInvoiceStars#65f00ce3 purpose:InputStorePaymentPurpose = InputInvoice; payments.exportedInvoice#aed0cbd9 url:string = payments.ExportedInvoice; @@ -1489,7 +1492,8 @@ inputStorePaymentPremiumSubscription#a6751e66 flags:# restore:flags.0?true upgra inputStorePaymentGiftPremium#616f7fe8 user_id:InputUser currency:string amount:long = InputStorePaymentPurpose; inputStorePaymentPremiumGiftCode#a3805f3f flags:# users:Vector boost_peer:flags.0?InputPeer currency:string amount:long = InputStorePaymentPurpose; inputStorePaymentPremiumGiveaway#160544ca flags:# only_new_subscribers:flags.0?true winners_are_visible:flags.3?true boost_peer:InputPeer additional_peers:flags.1?Vector countries_iso2:flags.2?Vector prize_description:flags.4?string random_id:long until_date:int currency:string amount:long = InputStorePaymentPurpose; -inputStorePaymentStars#4f0ee8df flags:# stars:long currency:string amount:long = InputStorePaymentPurpose; +inputStorePaymentStarsTopup#dddd0f56 stars:long currency:string amount:long = InputStorePaymentPurpose; +inputStorePaymentStarsGift#1d741ef7 user_id:InputUser stars:long currency:string amount:long = InputStorePaymentPurpose; premiumGiftOption#74c34319 flags:# months:int currency:string amount:long bot_url:string store_product:flags.0?string = PremiumGiftOption; @@ -1637,6 +1641,7 @@ mediaAreaSuggestedReaction#14455871 flags:# dark:flags.0?true flipped:flags.1?tr mediaAreaChannelPost#770416af coordinates:MediaAreaCoordinates channel_id:long msg_id:int = MediaArea; inputMediaAreaChannelPost#2271f2bf coordinates:MediaAreaCoordinates channel:InputChannel msg_id:int = MediaArea; mediaAreaUrl#37381085 coordinates:MediaAreaCoordinates url:string = MediaArea; +mediaAreaWeather#49a6549c coordinates:MediaAreaCoordinates emoji:string temperature_c:double color:int = MediaArea; peerStories#9a35e999 flags:# peer:Peer max_read_id:flags.0?int stories:Vector = PeerStories; @@ -1830,7 +1835,7 @@ starsTransactionPeerAds#60682812 = StarsTransactionPeer; starsTopupOption#bd915c0 flags:# extended:flags.1?true stars:long store_product:flags.0?string currency:string amount:long = StarsTopupOption; -starsTransaction#2db5418f flags:# refund:flags.3?true pending:flags.4?true failed:flags.6?true id:string stars:long date:int peer:StarsTransactionPeer title:flags.0?string description:flags.1?string photo:flags.2?WebDocument transaction_date:flags.5?int transaction_url:flags.5?string bot_payload:flags.7?bytes msg_id:flags.8?int extended_media:flags.9?Vector = StarsTransaction; +starsTransaction#2db5418f flags:# refund:flags.3?true pending:flags.4?true failed:flags.6?true gift:flags.10?true id:string stars:long date:int peer:StarsTransactionPeer title:flags.0?string description:flags.1?string photo:flags.2?WebDocument transaction_date:flags.5?int transaction_url:flags.5?string bot_payload:flags.7?bytes msg_id:flags.8?int extended_media:flags.9?Vector = StarsTransaction; payments.starsStatus#8cf4ee60 flags:# balance:long history:Vector next_offset:flags.0?string chats:Vector users:Vector = payments.StarsStatus; @@ -1850,6 +1855,14 @@ payments.starsRevenueAdsAccountUrl#394e7f21 url:string = payments.StarsRevenueAd inputStarsTransaction#206ae6d1 flags:# refund:flags.0?true id:string = InputStarsTransaction; +starsGiftOption#5e0589f1 flags:# extended:flags.1?true stars:long store_product:flags.0?string currency:string amount:long = StarsGiftOption; + +bots.popularAppBots#1991b13b flags:# next_offset:flags.0?string users:Vector = bots.PopularAppBots; + +botPreviewMedia#23e91ba3 date:int media:MessageMedia = BotPreviewMedia; + +bots.previewInfo#ca71d64 media:Vector lang_codes:Vector = bots.PreviewInfo; + ---functions--- invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X; @@ -2016,7 +2029,7 @@ contacts.unblock#b550d328 flags:# my_stories_from:flags.0?true id:InputPeer = Bo contacts.getBlocked#9a868f80 flags:# my_stories_from:flags.0?true offset:int limit:int = contacts.Blocked; contacts.search#11f812d8 q:string limit:int = contacts.Found; contacts.resolveUsername#f93ccba3 username:string = contacts.ResolvedPeer; -contacts.getTopPeers#973478b6 flags:# correspondents:flags.0?true bots_pm:flags.1?true bots_inline:flags.2?true phone_calls:flags.3?true forward_users:flags.4?true forward_chats:flags.5?true groups:flags.10?true channels:flags.15?true offset:int limit:int hash:long = contacts.TopPeers; +contacts.getTopPeers#973478b6 flags:# correspondents:flags.0?true bots_pm:flags.1?true bots_inline:flags.2?true phone_calls:flags.3?true forward_users:flags.4?true forward_chats:flags.5?true groups:flags.10?true channels:flags.15?true bots_app:flags.16?true offset:int limit:int hash:long = contacts.TopPeers; contacts.resetTopPeerRating#1ae373ac category:TopPeerCategory peer:InputPeer = Bool; contacts.resetSaved#879537f1 = Bool; contacts.getSaved#82f1e39f = Vector; @@ -2245,6 +2258,7 @@ messages.getAvailableEffects#dea20a39 hash:int = messages.AvailableEffects; messages.editFactCheck#589ee75 peer:InputPeer msg_id:int text:TextWithEntities = Updates; messages.deleteFactCheck#d1da940c peer:InputPeer msg_id:int = Updates; messages.getFactCheck#b9cdc5ee peer:InputPeer msg_id:Vector = Vector; +messages.requestMainWebView#c9e01e7b flags:# compact:flags.7?true peer:InputPeer bot:InputUser start_param:flags.1?string theme_params:flags.0?DataJSON platform:string = WebViewResult; updates.getState#edd4882a = updates.State; updates.getDifference#19c2f763 flags:# pts:int pts_limit:flags.1?int pts_total_limit:flags.0?int date:int qts:int qts_limit:flags.2?int = updates.Difference; @@ -2373,6 +2387,13 @@ bots.toggleUsername#53ca973 bot:InputUser username:string active:Bool = Bool; bots.canSendMessage#1359f4e6 bot:InputUser = Bool; bots.allowSendMessage#f132e3ef bot:InputUser = Updates; bots.invokeWebViewCustomMethod#87fc5e7 bot:InputUser custom_method:string params:DataJSON = DataJSON; +bots.getPopularAppBots#c2510192 offset:string limit:int = bots.PopularAppBots; +bots.addPreviewMedia#17aeb75a bot:InputUser lang_code:string media:InputMedia = BotPreviewMedia; +bots.editPreviewMedia#8525606f bot:InputUser lang_code:string media:InputMedia new_media:InputMedia = BotPreviewMedia; +bots.deletePreviewMedia#2d0135b3 bot:InputUser lang_code:string media:Vector = Bool; +bots.reorderPreviewMedias#b627f3aa bot:InputUser lang_code:string order:Vector = Bool; +bots.getPreviewInfo#423ab3ad bot:InputUser lang_code:string = bots.PreviewInfo; +bots.getPreviewMedias#a2a5594d bot:InputUser = Vector; payments.getPaymentForm#37148dbb flags:# invoice:InputInvoice theme_params:flags.0?DataJSON = payments.PaymentForm; payments.getPaymentReceipt#2478d1cc peer:InputPeer msg_id:int = payments.PaymentReceipt; @@ -2399,6 +2420,7 @@ payments.getStarsRevenueStats#d91ffad6 flags:# dark:flags.0?true peer:InputPeer payments.getStarsRevenueWithdrawalUrl#13bbe8b3 peer:InputPeer stars:long password:InputCheckPasswordSRP = payments.StarsRevenueWithdrawalUrl; payments.getStarsRevenueAdsAccountUrl#d1d7efc5 peer:InputPeer = payments.StarsRevenueAdsAccountUrl; payments.getStarsTransactionsByID#27842d2e peer:InputPeer id:Vector = payments.StarsStatus; +payments.getStarsGiftOptions#d3c96bc8 flags:# user_id:flags.0?InputUser = Vector; stickers.createStickerSet#9021ab67 flags:# masks:flags.0?true emojis:flags.5?true text_color:flags.6?true user_id:InputUser title:string short_name:string thumb:flags.2?InputDocument stickers:Vector software:flags.3?string = messages.StickerSet; stickers.removeStickerFromSet#f7760f51 sticker:InputDocument = messages.StickerSet; diff --git a/td/telegram/AnimationsManager.cpp b/td/telegram/AnimationsManager.cpp index 0a2827ec5..e972fde62 100644 --- a/td/telegram/AnimationsManager.cpp +++ b/td/telegram/AnimationsManager.cpp @@ -340,7 +340,7 @@ tl_object_ptr AnimationsManager::get_input_media( if (mime_type == "video/mp4") { attributes.push_back(make_tl_object( 0, false /*ignored*/, false /*ignored*/, false /*ignored*/, animation->duration, animation->dimensions.width, - animation->dimensions.height, 0)); + animation->dimensions.height, 0, 0.0)); } else if (animation->dimensions.width != 0 && animation->dimensions.height != 0) { if (!begins_with(mime_type, "image/")) { mime_type = "image/gif"; diff --git a/td/telegram/InlineQueriesManager.cpp b/td/telegram/InlineQueriesManager.cpp index d8dac00f0..70f089a75 100644 --- a/td/telegram/InlineQueriesManager.cpp +++ b/td/telegram/InlineQueriesManager.cpp @@ -962,7 +962,7 @@ Result> InlineQueriesManager:: if (width > 0 && height > 0) { if ((duration > 0 || type == "video" || content_type == "video/mp4") && !begins_with(content_type, "image/")) { attributes.push_back(make_tl_object( - 0, false /*ignored*/, false /*ignored*/, false /*ignored*/, duration, width, height, 0)); + 0, false /*ignored*/, false /*ignored*/, false /*ignored*/, duration, width, height, 0, 0.0)); } else { attributes.push_back(make_tl_object(width, height)); } diff --git a/td/telegram/MediaArea.cpp b/td/telegram/MediaArea.cpp index 07203192e..1a1e3611a 100644 --- a/td/telegram/MediaArea.cpp +++ b/td/telegram/MediaArea.cpp @@ -91,6 +91,10 @@ MediaArea::MediaArea(Td *td, telegram_api::object_ptr & } break; } + case telegram_api::mediaAreaWeather::ID: { + // auto area = telegram_api::move_object_as(media_area_ptr); + break; + } case telegram_api::inputMediaAreaVenue::ID: LOG(ERROR) << "Receive " << to_string(media_area_ptr); break; diff --git a/td/telegram/MessageContent.cpp b/td/telegram/MessageContent.cpp index b590d6f1d..c9f39a15f 100644 --- a/td/telegram/MessageContent.cpp +++ b/td/telegram/MessageContent.cpp @@ -6021,7 +6021,7 @@ static auto secret_to_telegram(secret_api::documentAttributeSticker &sticker) { // documentAttributeVideo23 duration:int w:int h:int = DocumentAttribute; static auto secret_to_telegram(secret_api::documentAttributeVideo23 &video) { return make_tl_object(0, false, false, false, video.duration_, video.w_, - video.h_, 0); + video.h_, 0, 0.0); } // documentAttributeFilename file_name:string = DocumentAttribute; @@ -6036,7 +6036,7 @@ static auto secret_to_telegram(secret_api::documentAttributeFilename &filename) static auto secret_to_telegram(secret_api::documentAttributeVideo &video) { return make_tl_object( video.round_message_ ? telegram_api::documentAttributeVideo::ROUND_MESSAGE_MASK : 0, video.round_message_, false, - false, video.duration_, video.w_, video.h_, 0); + false, video.duration_, video.w_, video.h_, 0, 0.0); } static auto telegram_documentAttributeAudio(bool is_voice_note, int duration, string title, string performer, @@ -6946,6 +6946,7 @@ unique_ptr get_action_message_content(Td *td, tl_object_ptr get_action_message_content(Td *td, tl_object_ptrcharge_->id_), std::move(action->charge_->provider_charge_id_)); } + case telegram_api::messageActionGiftStars::ID: + return make_unique(); default: UNREACHABLE(); } diff --git a/td/telegram/NotificationManager.cpp b/td/telegram/NotificationManager.cpp index c82f21248..f8e2a434a 100644 --- a/td/telegram/NotificationManager.cpp +++ b/td/telegram/NotificationManager.cpp @@ -3086,9 +3086,9 @@ void NotificationManager::add_push_notification_user( false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, 0, false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, - false /*ignored*/, false /*ignored*/, sender_user_id.get(), sender_access_hash, user_name, string(), string(), - string(), std::move(sender_photo), nullptr, 0, Auto(), string(), string(), nullptr, - vector>(), 0, nullptr, nullptr); + false /*ignored*/, false /*ignored*/, false /*ignored*/, sender_user_id.get(), sender_access_hash, user_name, + string(), string(), string(), std::move(sender_photo), nullptr, 0, Auto(), string(), string(), nullptr, + vector>(), 0, nullptr, nullptr, 0); td_->user_manager_->on_get_user(std::move(user), "add_push_notification_user"); } diff --git a/td/telegram/Payments.cpp b/td/telegram/Payments.cpp index 332d6e9a4..9799d324f 100644 --- a/td/telegram/Payments.cpp +++ b/td/telegram/Payments.cpp @@ -131,9 +131,9 @@ Result get_input_invoice_info(Td *td, td_api::object_ptrcurrency_)) { return Status::Error(400, "Strings must be encoded in UTF-8"); } - auto option = telegram_api::make_object(0, false /*ignored*/, p->star_count_, - string(), p->currency_, p->amount_); - result.input_invoice_ = telegram_api::make_object(std::move(option)); + auto purpose = telegram_api::make_object(p->star_count_, + p->currency_, p->amount_); + result.input_invoice_ = telegram_api::make_object(std::move(purpose)); break; } default: diff --git a/td/telegram/Premium.cpp b/td/telegram/Premium.cpp index 6c2d3e44e..fa9bea962 100644 --- a/td/telegram/Premium.cpp +++ b/td/telegram/Premium.cpp @@ -253,8 +253,8 @@ static Result> get_input_s if (!clean_input_string(p->currency_)) { return Status::Error(400, "Strings must be encoded in UTF-8"); } - return telegram_api::make_object(0, p->star_count_, p->currency_, - p->amount_); + return telegram_api::make_object(p->star_count_, p->currency_, + p->amount_); } default: UNREACHABLE(); diff --git a/td/telegram/TopDialogCategory.cpp b/td/telegram/TopDialogCategory.cpp index 76cfa9cd7..60a6185c9 100644 --- a/td/telegram/TopDialogCategory.cpp +++ b/td/telegram/TopDialogCategory.cpp @@ -76,6 +76,8 @@ TopDialogCategory get_top_dialog_category(const telegram_api::object_ptrnet_query_creator().create(telegram_api::contacts_getTopPeers( - flags, false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, - false /*ignored*/, false /*ignored*/, false /*ignored*/, 0 /*offset*/, 100 /*limit*/, hash))); + send_query(G()->net_query_creator().create( + telegram_api::contacts_getTopPeers(flags, false /*ignored*/, false /*ignored*/, false /*ignored*/, + false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, + false /*ignored*/, false /*ignored*/, 0 /*offset*/, 100 /*limit*/, hash))); } void on_result(BufferSlice packet) final { diff --git a/td/telegram/UpdatesManager.cpp b/td/telegram/UpdatesManager.cpp index f46a2c126..4ab388a1c 100644 --- a/td/telegram/UpdatesManager.cpp +++ b/td/telegram/UpdatesManager.cpp @@ -996,6 +996,7 @@ bool UpdatesManager::is_acceptable_message(const telegram_api::Message *message_ case telegram_api::messageActionGiveawayResults::ID: case telegram_api::messageActionBoostApply::ID: case telegram_api::messageActionRequestedPeerSentMe::ID: + case telegram_api::messageActionGiftStars::ID: break; case telegram_api::messageActionChatCreate::ID: { auto chat_create = static_cast(action); diff --git a/td/telegram/UserManager.cpp b/td/telegram/UserManager.cpp index 7f7eacd18..4999ea778 100644 --- a/td/telegram/UserManager.cpp +++ b/td/telegram/UserManager.cpp @@ -3837,9 +3837,10 @@ UserManager::User *UserManager::get_user_force(UserId user_id, const char *sourc false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, 0, false /*ignored*/, false /*ignored*/, - false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, user_id.get(), 1, first_name, - string(), username, phone_number, std::move(profile_photo), nullptr, bot_info_version, Auto(), string(), - string(), nullptr, vector>(), 0, nullptr, nullptr); + false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, user_id.get(), 1, + first_name, string(), username, phone_number, std::move(profile_photo), nullptr, bot_info_version, Auto(), + string(), string(), nullptr, vector>(), 0, nullptr, nullptr, + 0); on_get_user(std::move(user), "get_user_force"); u = get_user(user_id); CHECK(u != nullptr && u->is_received); diff --git a/td/telegram/Version.h b/td/telegram/Version.h index b996f7d15..e89da0522 100644 --- a/td/telegram/Version.h +++ b/td/telegram/Version.h @@ -10,7 +10,7 @@ namespace td { -constexpr int32 MTPROTO_LAYER = 184; +constexpr int32 MTPROTO_LAYER = 185; enum class Version : int32 { Initial, // 0 diff --git a/td/telegram/VideoNotesManager.cpp b/td/telegram/VideoNotesManager.cpp index 4b0fd37b5..ec94f2621 100644 --- a/td/telegram/VideoNotesManager.cpp +++ b/td/telegram/VideoNotesManager.cpp @@ -243,7 +243,7 @@ tl_object_ptr VideoNotesManager::get_input_media( telegram_api::documentAttributeVideo::ROUND_MESSAGE_MASK, false /*ignored*/, false /*ignored*/, false /*ignored*/, video_note->duration, video_note->dimensions.width ? video_note->dimensions.width : suggested_video_note_length, - video_note->dimensions.height ? video_note->dimensions.height : suggested_video_note_length, 0)); + video_note->dimensions.height ? video_note->dimensions.height : suggested_video_note_length, 0, 0.0)); int32 flags = telegram_api::inputMediaUploadedDocument::NOSOUND_VIDEO_MASK; if (ttl != 0) { flags |= telegram_api::inputMediaUploadedDocument::TTL_SECONDS_MASK; diff --git a/td/telegram/VideosManager.cpp b/td/telegram/VideosManager.cpp index 687c6b946..2527aded5 100644 --- a/td/telegram/VideosManager.cpp +++ b/td/telegram/VideosManager.cpp @@ -292,7 +292,7 @@ tl_object_ptr VideosManager::get_input_media( } attributes.push_back(make_tl_object( attribute_flags, false /*ignored*/, false /*ignored*/, false /*ignored*/, video->precise_duration, - video->dimensions.width, video->dimensions.height, 0)); + video->dimensions.width, video->dimensions.height, 0, 0.0)); } if (!video->file_name.empty()) { attributes.push_back(make_tl_object(video->file_name));