From 899e4cd5d10ec4614bd16ece3f6fbeb28c65603d Mon Sep 17 00:00:00 2001 From: Mikhail Filimonov Date: Mon, 11 Aug 2025 16:47:44 +0100 Subject: [PATCH] update macos headers --- .../td/td/generate/auto/td/telegram/e2e_api.h | 2 - .../td/generate/auto/td/telegram/secret_api.h | 5 +- .../td/td/generate/auto/td/telegram/td_api.h | 1864 ++++++++++++----- .../generate/auto/td/telegram/td_api_json.h | 194 +- .../generate/auto/td/telegram/telegram_api.h | 1137 +++++++--- .../SharedHeaders/td/td/mtproto/AuthData.h | 14 + .../td/td/telegram/AuthManager.h | 2 +- .../td/td/telegram/BotRecommendationManager.h | 7 +- .../td/telegram/BusinessConnectionManager.h | 2 +- .../SharedHeaders/td/td/telegram/CallActor.h | 16 +- .../td/td/telegram/CallDiscardReason.h | 4 +- .../td/td/telegram/CallManager.h | 12 +- .../telegram/ChannelRecommendationManager.h | 7 +- .../td/td/telegram/ChatManager.h | 10 +- .../td/td/telegram/CommonDialogManager.h | 2 +- .../td/td/telegram/ConfigManager.h | 2 +- .../td/td/telegram/DialogInviteLinkManager.h | 2 +- .../td/td/telegram/DialogManager.h | 4 +- .../td/td/telegram/DialogParticipantManager.h | 2 +- .../td/td/telegram/ForumTopicManager.h | 2 +- .../td/td/telegram/GroupCallJoinParameters.h | 30 + .../td/td/telegram/GroupCallManager.h | 161 +- .../td/td/telegram/GroupCallParticipant.h | 4 +- .../td/td/telegram/InlineQueriesManager.h | 2 +- .../td/td/telegram/InputGroupCall.h | 54 + .../td/td/telegram/InputGroupCallId.h | 4 +- .../td/td/telegram/LinkManager.h | 8 +- .../td/td/telegram/MessageContent.h | 2 + .../td/td/telegram/MessageContentType.h | 3 +- .../td/td/telegram/MessagesManager.h | 31 +- .../SharedHeaders/td/td/telegram/OrderInfo.h | 2 +- .../td/td/telegram/PollManager.h | 2 +- .../td/td/telegram/QuickReplyManager.h | 2 +- .../SharedHeaders/td/td/telegram/Requests.h | 54 +- .../td/td/telegram/SavedMessagesManager.h | 2 +- .../td/td/telegram/SendCodeHelper.h | 6 +- .../SharedHeaders/td/td/telegram/StarGift.h | 3 + .../td/td/telegram/StarGiftAttribute.h | 6 + .../td/td/telegram/StarGiftAttributeId.h | 71 + .../SharedHeaders/td/td/telegram/StarGiftId.h | 6 +- .../td/td/telegram/StarGiftManager.h | 12 +- .../td/td/telegram/StickersManager.h | 10 +- .../td/td/telegram/StoryManager.h | 4 +- .../td/td/telegram/SuggestedAction.h | 36 +- .../td/td/telegram/TranslationManager.h | 4 +- .../td/td/telegram/UpdatesManager.h | 3 +- .../td/td/telegram/UserManager.h | 6 +- .../td/td/telegram/UserStarGift.h | 2 + .../SharedHeaders/td/td/telegram/Version.h | 2 +- .../td/td/telegram/files/FileManager.h | 3 +- .../td/td/telegram/logevent/LogEvent.h | 3 - .../SharedHeaders/td/td/telegram/misc.h | 4 +- .../td/td/telegram/net/Session.h | 4 +- .../td/tdactor/td/actor/impl/Scheduler-decl.h | 4 +- .../td/tdactor/td/actor/impl/Scheduler.h | 2 +- .../td/tddb/td/db/BinlogKeyValue.h | 14 +- .../td/tde2e/td/e2e/Blockchain.h | 2 +- .../SharedHeaders/td/tde2e/td/e2e/Mnemonic.h | 2 +- .../SharedHeaders/td/tde2e/td/e2e/e2e_api.h | 9 +- .../td/tde2e/td/e2e/e2e_errors.h | 1 + .../SharedHeaders/td/tdtl/td/tl/tl_config.h | 2 +- .../td/tdutils/td/utils/StealingQueue.h | 2 +- .../SharedHeaders/td/tdutils/td/utils/emoji.h | 2 +- .../td/tdutils/td/utils/tl_helpers.h | 19 +- .../td/tdutils/td/utils/tl_parsers.h | 9 +- 65 files changed, 2886 insertions(+), 1018 deletions(-) create mode 100644 third-party/td/TdBinding/SharedHeaders/td/td/telegram/GroupCallJoinParameters.h create mode 100644 third-party/td/TdBinding/SharedHeaders/td/td/telegram/InputGroupCall.h create mode 100644 third-party/td/TdBinding/SharedHeaders/td/td/telegram/StarGiftAttributeId.h diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/generate/auto/td/telegram/e2e_api.h b/third-party/td/TdBinding/SharedHeaders/td/td/generate/auto/td/telegram/e2e_api.h index 26cf860f0b..2bf04e85a1 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/generate/auto/td/telegram/e2e_api.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/generate/auto/td/telegram/e2e_api.h @@ -412,7 +412,6 @@ class e2e_personalContactState final : public e2e_Personal { public: int32 flags_; bool is_contact_; - enum Flags : std::int32_t { IS_CONTACT_MASK = 1 }; e2e_personalContactState(); @@ -798,7 +797,6 @@ class e2e_chain_groupParticipant final : public Object { bool add_users_; bool remove_users_; int32 version_; - enum Flags : std::int32_t { ADD_USERS_MASK = 1, REMOVE_USERS_MASK = 2 }; e2e_chain_groupParticipant(); diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/generate/auto/td/telegram/secret_api.h b/third-party/td/TdBinding/SharedHeaders/td/td/generate/auto/td/telegram/secret_api.h index a26ba48d36..4825d039eb 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/generate/auto/td/telegram/secret_api.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/generate/auto/td/telegram/secret_api.h @@ -243,7 +243,7 @@ class decryptedMessage final : public DecryptedMessage { string via_bot_name_; int64 reply_to_random_id_; int64 grouped_id_; - enum Flags : std::int32_t { SILENT_MASK = 32, MEDIA_MASK = 512, ENTITIES_MASK = 128, VIA_BOT_NAME_MASK = 2048, REPLY_TO_RANDOM_ID_MASK = 8, GROUPED_ID_MASK = 131072 }; + enum Flags : std::int32_t { MEDIA_MASK = 512, ENTITIES_MASK = 128, VIA_BOT_NAME_MASK = 2048, REPLY_TO_RANDOM_ID_MASK = 8, GROUPED_ID_MASK = 131072 }; decryptedMessage(); @@ -1252,7 +1252,7 @@ class documentAttributeAudio final : public DocumentAttribute { string title_; string performer_; bytes waveform_; - enum Flags : std::int32_t { VOICE_MASK = 1024, TITLE_MASK = 1, PERFORMER_MASK = 2, WAVEFORM_MASK = 4 }; + enum Flags : std::int32_t { TITLE_MASK = 1, PERFORMER_MASK = 2, WAVEFORM_MASK = 4 }; documentAttributeAudio(); @@ -1280,7 +1280,6 @@ class documentAttributeVideo final : public DocumentAttribute { int32 duration_; int32 w_; int32 h_; - enum Flags : std::int32_t { ROUND_MESSAGE_MASK = 1 }; documentAttributeVideo(); diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/generate/auto/td/telegram/td_api.h b/third-party/td/TdBinding/SharedHeaders/td/td/generate/auto/td/telegram/td_api.h index a2ad13b35d..99630366ad 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/generate/auto/td/telegram/td_api.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/generate/auto/td/telegram/td_api.h @@ -1187,6 +1187,47 @@ class autosaveSettingsScopeChat final : public AutosaveSettingsScope { void store(TlStorerToString &s, const char *field_name) const final; }; +class gift; + +class availableGift final : public Object { + std::int32_t get_id() const final { + return ID; + } + + public: + object_ptr gift_; + int32 resale_count_; + int53 min_resale_star_count_; + string title_; + + availableGift(); + + availableGift(object_ptr &&gift_, int32 resale_count_, int53 min_resale_star_count_, string const &title_); + + static const std::int32_t ID = 850530502; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class availableGift; + +class availableGifts final : public Object { + std::int32_t get_id() const final { + return ID; + } + + public: + array> gifts_; + + availableGifts(); + + explicit availableGifts(array> &&gifts_); + + static const std::int32_t ID = -1450341886; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class ReactionType; class availableReaction final : public Object { @@ -2589,13 +2630,12 @@ class call final : public Object { bool is_outgoing_; bool is_video_; object_ptr state_; - int32 group_call_id_; call(); - call(int32 id_, int53 user_id_, bool is_outgoing_, bool is_video_, object_ptr &&state_, int32 group_call_id_); + call(int32 id_, int53 user_id_, bool is_outgoing_, bool is_video_, object_ptr &&state_); - static const std::int32_t ID = -1643259734; + static const std::int32_t ID = 920360804; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -2674,19 +2714,19 @@ class callDiscardReasonHungUp final : public CallDiscardReason { void store(TlStorerToString &s, const char *field_name) const final; }; -class callDiscardReasonAllowGroupCall final : public CallDiscardReason { +class callDiscardReasonUpgradeToGroupCall final : public CallDiscardReason { std::int32_t get_id() const final { return ID; } public: - bytes encrypted_group_call_key_; + string invite_link_; - callDiscardReasonAllowGroupCall(); + callDiscardReasonUpgradeToGroupCall(); - explicit callDiscardReasonAllowGroupCall(bytes const &encrypted_group_call_key_); + explicit callDiscardReasonUpgradeToGroupCall(string const &invite_link_); - static const std::int32_t ID = -1357414443; + static const std::int32_t ID = 1254509319; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -2980,13 +3020,14 @@ class callStateReady final : public CallState { bytes encryption_key_; array emojis_; bool allow_p2p_; + bool is_group_call_supported_; string custom_parameters_; callStateReady(); - callStateReady(object_ptr &&protocol_, array> &&servers_, string const &config_, bytes const &encryption_key_, array &&emojis_, bool allow_p2p_, string const &custom_parameters_); + callStateReady(object_ptr &&protocol_, array> &&servers_, string const &config_, bytes const &encryption_key_, array &&emojis_, bool allow_p2p_, bool is_group_call_supported_, string const &custom_parameters_); - static const std::int32_t ID = 731619651; + static const std::int32_t ID = -281776921; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -3117,6 +3158,103 @@ class callbackQueryPayloadGame final : public CallbackQueryPayload { void store(TlStorerToString &s, const char *field_name) const final; }; +class CanPostStoryResult: public Object { + public: +}; + +class canPostStoryResultOk final : public CanPostStoryResult { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 story_count_; + + canPostStoryResultOk(); + + explicit canPostStoryResultOk(int32 story_count_); + + static const std::int32_t ID = 2083205610; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class canPostStoryResultPremiumNeeded final : public CanPostStoryResult { + std::int32_t get_id() const final { + return ID; + } + + public: + + canPostStoryResultPremiumNeeded(); + + static const std::int32_t ID = 935130501; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class canPostStoryResultBoostNeeded final : public CanPostStoryResult { + std::int32_t get_id() const final { + return ID; + } + + public: + + canPostStoryResultBoostNeeded(); + + static const std::int32_t ID = 80246195; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class canPostStoryResultActiveStoryLimitExceeded final : public CanPostStoryResult { + std::int32_t get_id() const final { + return ID; + } + + public: + + canPostStoryResultActiveStoryLimitExceeded(); + + static const std::int32_t ID = -1640759002; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class canPostStoryResultWeeklyLimitExceeded final : public CanPostStoryResult { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 retry_after_; + + canPostStoryResultWeeklyLimitExceeded(); + + explicit canPostStoryResultWeeklyLimitExceeded(int32 retry_after_); + + static const std::int32_t ID = 552858605; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class canPostStoryResultMonthlyLimitExceeded final : public CanPostStoryResult { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 retry_after_; + + canPostStoryResultMonthlyLimitExceeded(); + + explicit canPostStoryResultMonthlyLimitExceeded(int32 retry_after_); + + static const std::int32_t ID = -784208562; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class CanSendMessageToUserResult: public Object { public: }; @@ -3180,100 +3318,6 @@ class canSendMessageToUserResultUserRestrictsNewChats final : public CanSendMess void store(TlStorerToString &s, const char *field_name) const final; }; -class CanSendStoryResult: public Object { - public: -}; - -class canSendStoryResultOk final : public CanSendStoryResult { - std::int32_t get_id() const final { - return ID; - } - - public: - - canSendStoryResultOk(); - - static const std::int32_t ID = 1346171133; - - void store(TlStorerToString &s, const char *field_name) const final; -}; - -class canSendStoryResultPremiumNeeded final : public CanSendStoryResult { - std::int32_t get_id() const final { - return ID; - } - - public: - - canSendStoryResultPremiumNeeded(); - - static const std::int32_t ID = 1451220585; - - void store(TlStorerToString &s, const char *field_name) const final; -}; - -class canSendStoryResultBoostNeeded final : public CanSendStoryResult { - std::int32_t get_id() const final { - return ID; - } - - public: - - canSendStoryResultBoostNeeded(); - - static const std::int32_t ID = -1637816017; - - void store(TlStorerToString &s, const char *field_name) const final; -}; - -class canSendStoryResultActiveStoryLimitExceeded final : public CanSendStoryResult { - std::int32_t get_id() const final { - return ID; - } - - public: - - canSendStoryResultActiveStoryLimitExceeded(); - - static const std::int32_t ID = -1344689450; - - void store(TlStorerToString &s, const char *field_name) const final; -}; - -class canSendStoryResultWeeklyLimitExceeded final : public CanSendStoryResult { - std::int32_t get_id() const final { - return ID; - } - - public: - int32 retry_after_; - - canSendStoryResultWeeklyLimitExceeded(); - - explicit canSendStoryResultWeeklyLimitExceeded(int32 retry_after_); - - static const std::int32_t ID = 323068088; - - void store(TlStorerToString &s, const char *field_name) const final; -}; - -class canSendStoryResultMonthlyLimitExceeded final : public CanSendStoryResult { - std::int32_t get_id() const final { - return ID; - } - - public: - int32 retry_after_; - - canSendStoryResultMonthlyLimitExceeded(); - - explicit canSendStoryResultMonthlyLimitExceeded(int32 retry_after_); - - static const std::int32_t ID = -578665771; - - void store(TlStorerToString &s, const char *field_name) const final; -}; - class CanTransferOwnershipResult: public Object { public: }; @@ -3958,14 +4002,15 @@ class chatBoostFeatures final : public Object { int32 min_chat_theme_background_boost_level_; int32 min_custom_background_boost_level_; int32 min_custom_emoji_sticker_set_boost_level_; + int32 min_automatic_translation_boost_level_; int32 min_speech_recognition_boost_level_; int32 min_sponsored_message_disable_boost_level_; chatBoostFeatures(); - chatBoostFeatures(array> &&features_, int32 min_profile_background_custom_emoji_boost_level_, int32 min_background_custom_emoji_boost_level_, int32 min_emoji_status_boost_level_, int32 min_chat_theme_background_boost_level_, int32 min_custom_background_boost_level_, int32 min_custom_emoji_sticker_set_boost_level_, int32 min_speech_recognition_boost_level_, int32 min_sponsored_message_disable_boost_level_); + chatBoostFeatures(array> &&features_, int32 min_profile_background_custom_emoji_boost_level_, int32 min_background_custom_emoji_boost_level_, int32 min_emoji_status_boost_level_, int32 min_chat_theme_background_boost_level_, int32 min_custom_background_boost_level_, int32 min_custom_emoji_sticker_set_boost_level_, int32 min_automatic_translation_boost_level_, int32 min_speech_recognition_boost_level_, int32 min_sponsored_message_disable_boost_level_); - static const std::int32_t ID = 866182642; + static const std::int32_t ID = -940531367; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -3988,14 +4033,15 @@ class chatBoostLevelFeatures final : public Object { int32 chat_theme_background_count_; bool can_set_custom_background_; bool can_set_custom_emoji_sticker_set_; + bool can_enable_automatic_translation_; bool can_recognize_speech_; bool can_disable_sponsored_messages_; chatBoostLevelFeatures(); - chatBoostLevelFeatures(int32 level_, int32 story_per_day_count_, int32 custom_emoji_reaction_count_, int32 title_color_count_, int32 profile_accent_color_count_, bool can_set_profile_background_custom_emoji_, int32 accent_color_count_, bool can_set_background_custom_emoji_, bool can_set_emoji_status_, int32 chat_theme_background_count_, bool can_set_custom_background_, bool can_set_custom_emoji_sticker_set_, bool can_recognize_speech_, bool can_disable_sponsored_messages_); + chatBoostLevelFeatures(int32 level_, int32 story_per_day_count_, int32 custom_emoji_reaction_count_, int32 title_color_count_, int32 profile_accent_color_count_, bool can_set_profile_background_custom_emoji_, int32 accent_color_count_, bool can_set_background_custom_emoji_, bool can_set_emoji_status_, int32 chat_theme_background_count_, bool can_set_custom_background_, bool can_set_custom_emoji_sticker_set_, bool can_enable_automatic_translation_, bool can_recognize_speech_, bool can_disable_sponsored_messages_); - static const std::int32_t ID = -189458156; + static const std::int32_t ID = 975439470; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -4852,6 +4898,23 @@ class chatEventShowMessageSenderToggled final : public ChatEventAction { void store(TlStorerToString &s, const char *field_name) const final; }; +class chatEventAutomaticTranslationToggled final : public ChatEventAction { + std::int32_t get_id() const final { + return ID; + } + + public: + bool has_automatic_translation_; + + chatEventAutomaticTranslationToggled(); + + explicit chatEventAutomaticTranslationToggled(bool has_automatic_translation_); + + static const std::int32_t ID = 194147926; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class chatEventInviteLinkEdited final : public ChatEventAction { std::int32_t get_id() const final { return ID; @@ -5968,8 +6031,8 @@ class chatNotificationSettings final : public Object { bool mute_stories_; bool use_default_story_sound_; int64 story_sound_id_; - bool use_default_show_story_sender_; - bool show_story_sender_; + bool use_default_show_story_poster_; + bool show_story_poster_; bool use_default_disable_pinned_message_notifications_; bool disable_pinned_message_notifications_; bool use_default_disable_mention_notifications_; @@ -5977,9 +6040,9 @@ class chatNotificationSettings final : public Object { chatNotificationSettings(); - chatNotificationSettings(bool use_default_mute_for_, int32 mute_for_, bool use_default_sound_, int64 sound_id_, bool use_default_show_preview_, bool show_preview_, bool use_default_mute_stories_, bool mute_stories_, bool use_default_story_sound_, int64 story_sound_id_, bool use_default_show_story_sender_, bool show_story_sender_, bool use_default_disable_pinned_message_notifications_, bool disable_pinned_message_notifications_, bool use_default_disable_mention_notifications_, bool disable_mention_notifications_); + chatNotificationSettings(bool use_default_mute_for_, int32 mute_for_, bool use_default_sound_, int64 sound_id_, bool use_default_show_preview_, bool show_preview_, bool use_default_mute_stories_, bool mute_stories_, bool use_default_story_sound_, int64 story_sound_id_, bool use_default_show_story_poster_, bool show_story_poster_, bool use_default_disable_pinned_message_notifications_, bool disable_pinned_message_notifications_, bool use_default_disable_mention_notifications_, bool disable_mention_notifications_); - static const std::int32_t ID = -572779825; + static const std::int32_t ID = 1459533846; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -7206,6 +7269,23 @@ class customRequestResult final : public Object { void store(TlStorerToString &s, const char *field_name) const final; }; +class data final : public Object { + std::int32_t get_id() const final { + return ID; + } + + public: + bytes data_; + + data(); + + explicit data(bytes const &data_); + + static const std::int32_t ID = 221197337; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class databaseStatistics final : public Object { std::int32_t get_id() const final { return ID; @@ -8250,23 +8330,6 @@ class fileDownloadedPrefixSize final : public Object { void store(TlStorerToString &s, const char *field_name) const final; }; -class filePart final : public Object { - std::int32_t get_id() const final { - return ID; - } - - public: - bytes data_; - - filePart(); - - explicit filePart(bytes const &data_); - - static const std::int32_t ID = 911821878; - - void store(TlStorerToString &s, const char *field_name) const final; -}; - class FileType: public Object { public: }; @@ -9135,6 +9198,72 @@ class gift final : public Object { void store(TlStorerToString &s, const char *field_name) const final; }; +class upgradedGift; + +class giftForResale final : public Object { + std::int32_t get_id() const final { + return ID; + } + + public: + object_ptr gift_; + string received_gift_id_; + + giftForResale(); + + giftForResale(object_ptr &&gift_, string const &received_gift_id_); + + static const std::int32_t ID = 1130990515; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class GiftForResaleOrder: public Object { + public: +}; + +class giftForResaleOrderPrice final : public GiftForResaleOrder { + std::int32_t get_id() const final { + return ID; + } + + public: + + giftForResaleOrderPrice(); + + static const std::int32_t ID = 1371740258; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class giftForResaleOrderPriceChangeDate final : public GiftForResaleOrder { + std::int32_t get_id() const final { + return ID; + } + + public: + + giftForResaleOrderPriceChangeDate(); + + static const std::int32_t ID = -1694144054; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class giftForResaleOrderNumber final : public GiftForResaleOrder { + std::int32_t get_id() const final { + return ID; + } + + public: + + giftForResaleOrderNumber(); + + static const std::int32_t ID = -1301157632; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class acceptedGiftTypes; class giftSettings final : public Object { @@ -9180,21 +9309,32 @@ class giftUpgradePreview final : public Object { void store(TlStorerToString &s, const char *field_name) const final; }; -class gift; +class giftForResale; -class gifts final : public Object { +class upgradedGiftBackdropCount; + +class upgradedGiftModelCount; + +class upgradedGiftSymbolCount; + +class giftsForResale final : public Object { std::int32_t get_id() const final { return ID; } public: - array> gifts_; + int32 total_count_; + array> gifts_; + array> models_; + array> symbols_; + array> backdrops_; + string next_offset_; - gifts(); + giftsForResale(); - explicit gifts(array> &&gifts_); + giftsForResale(int32 total_count_, array> &&gifts_, array> &&models_, array> &&symbols_, array> &&backdrops_, string const &next_offset_); - static const std::int32_t ID = 1652323382; + static const std::int32_t ID = 35082425; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -9401,14 +9541,16 @@ class groupCall final : public Object { public: int32 id_; - int32 from_call_id_; string title_; + string invite_link_; int32 scheduled_start_date_; bool enabled_start_notification_; bool is_active_; + bool is_video_chat_; bool is_rtmp_stream_; bool is_joined_; bool need_rejoin_; + bool is_owned_; bool can_be_managed_; int32 participant_count_; bool has_hidden_listeners_; @@ -9425,9 +9567,41 @@ class groupCall final : public Object { groupCall(); - groupCall(int32 id_, int32 from_call_id_, string const &title_, int32 scheduled_start_date_, bool enabled_start_notification_, bool is_active_, bool is_rtmp_stream_, bool is_joined_, bool need_rejoin_, bool can_be_managed_, int32 participant_count_, bool has_hidden_listeners_, bool loaded_all_participants_, array> &&recent_speakers_, bool is_my_video_enabled_, bool is_my_video_paused_, bool can_enable_video_, bool mute_new_participants_, bool can_toggle_mute_new_participants_, int32 record_duration_, bool is_video_recorded_, int32 duration_); + groupCall(int32 id_, string const &title_, string const &invite_link_, int32 scheduled_start_date_, bool enabled_start_notification_, bool is_active_, bool is_video_chat_, bool is_rtmp_stream_, bool is_joined_, bool need_rejoin_, bool is_owned_, bool can_be_managed_, int32 participant_count_, bool has_hidden_listeners_, bool loaded_all_participants_, array> &&recent_speakers_, bool is_my_video_enabled_, bool is_my_video_paused_, bool can_enable_video_, bool mute_new_participants_, bool can_toggle_mute_new_participants_, int32 record_duration_, bool is_video_recorded_, int32 duration_); - static const std::int32_t ID = 186241327; + static const std::int32_t ID = -144438687; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class GroupCallDataChannel: public Object { + public: +}; + +class groupCallDataChannelMain final : public GroupCallDataChannel { + std::int32_t get_id() const final { + return ID; + } + + public: + + groupCallDataChannelMain(); + + static const std::int32_t ID = -32177779; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class groupCallDataChannelScreenSharing final : public GroupCallDataChannel { + std::int32_t get_id() const final { + return ID; + } + + public: + + groupCallDataChannelScreenSharing(); + + static const std::int32_t ID = -601649103; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -9449,6 +9623,44 @@ class groupCallId final : public Object { void store(TlStorerToString &s, const char *field_name) const final; }; +class groupCallInfo final : public Object { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 group_call_id_; + string join_payload_; + + groupCallInfo(); + + groupCallInfo(int32 group_call_id_, string const &join_payload_); + + static const std::int32_t ID = 892575956; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class groupCallJoinParameters final : public Object { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 audio_source_id_; + string payload_; + bool is_muted_; + bool is_my_video_enabled_; + + groupCallJoinParameters(); + + groupCallJoinParameters(int32 audio_source_id_, string const &payload_, bool is_muted_, bool is_my_video_enabled_); + + static const std::int32_t ID = 1763438054; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class MessageSender; class groupCallParticipantVideoInfo; @@ -9510,6 +9722,26 @@ class groupCallParticipantVideoInfo final : public Object { class MessageSender; +class groupCallParticipants final : public Object { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 total_count_; + array> participant_ids_; + + groupCallParticipants(); + + groupCallParticipants(int32 total_count_, array> &&participant_ids_); + + static const std::int32_t ID = -1042491570; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class MessageSender; + class groupCallRecentSpeaker final : public Object { std::int32_t get_id() const final { return ID; @@ -9528,44 +9760,6 @@ class groupCallRecentSpeaker final : public Object { void store(TlStorerToString &s, const char *field_name) const final; }; -class groupCallStream final : public Object { - std::int32_t get_id() const final { - return ID; - } - - public: - int32 channel_id_; - int32 scale_; - int53 time_offset_; - - groupCallStream(); - - groupCallStream(int32 channel_id_, int32 scale_, int53 time_offset_); - - static const std::int32_t ID = -264564795; - - void store(TlStorerToString &s, const char *field_name) const final; -}; - -class groupCallStream; - -class groupCallStreams final : public Object { - std::int32_t get_id() const final { - return ID; - } - - public: - array> streams_; - - groupCallStreams(); - - explicit groupCallStreams(array> &&streams_); - - static const std::int32_t ID = -1032959578; - - void store(TlStorerToString &s, const char *field_name) const final; -}; - class GroupCallVideoQuality: public Object { public: }; @@ -10564,6 +10758,45 @@ class inputFileGenerated final : public InputFile { void store(TlStorerToString &s, const char *field_name) const final; }; +class InputGroupCall: public Object { + public: +}; + +class inputGroupCallLink final : public InputGroupCall { + std::int32_t get_id() const final { + return ID; + } + + public: + string link_; + + inputGroupCallLink(); + + explicit inputGroupCallLink(string const &link_); + + static const std::int32_t ID = -812157480; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class inputGroupCallMessage final : public InputGroupCall { + std::int32_t get_id() const final { + return ID; + } + + public: + int53 chat_id_; + int53 message_id_; + + inputGroupCallMessage(); + + inputGroupCallMessage(int53 chat_id_, int53 message_id_); + + static const std::int32_t ID = -341793768; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class InputFile; class date; @@ -11350,14 +11583,14 @@ class inputMessageStory final : public InputMessageContent { } public: - int53 story_sender_chat_id_; + int53 story_poster_chat_id_; int32 story_id_; inputMessageStory(); - inputMessageStory(int53 story_sender_chat_id_, int32 story_id_); + inputMessageStory(int53 story_poster_chat_id_, int32 story_id_); - static const std::int32_t ID = 554278243; + static const std::int32_t ID = -370732053; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -11433,14 +11666,14 @@ class inputMessageReplyToStory final : public InputMessageReplyTo { } public: - int53 story_sender_chat_id_; + int53 story_poster_chat_id_; int32 story_id_; inputMessageReplyToStory(); - inputMessageReplyToStory(int53 story_sender_chat_id_, int32 story_id_); + inputMessageReplyToStory(int53 story_poster_chat_id_, int32 story_id_); - static const std::int32_t ID = 1370410616; + static const std::int32_t ID = -1723842320; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -12570,6 +12803,23 @@ class internalLinkTypeGame final : public InternalLinkType { void store(TlStorerToString &s, const char *field_name) const final; }; +class internalLinkTypeGroupCall final : public InternalLinkType { + std::int32_t get_id() const final { + return ID; + } + + public: + string invite_link_; + + internalLinkTypeGroupCall(); + + explicit internalLinkTypeGroupCall(string const &invite_link_); + + static const std::int32_t ID = 1953084438; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class internalLinkTypeInstantView final : public InternalLinkType { std::int32_t get_id() const final { return ID; @@ -12690,6 +12940,20 @@ class internalLinkTypeMessageDraft final : public InternalLinkType { void store(TlStorerToString &s, const char *field_name) const final; }; +class internalLinkTypeMyStars final : public InternalLinkType { + std::int32_t get_id() const final { + return ID; + } + + public: + + internalLinkTypeMyStars(); + + static const std::int32_t ID = 1613887070; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class internalLinkTypePassportDataRequest final : public InternalLinkType { std::int32_t get_id() const final { return ID; @@ -12898,14 +13162,14 @@ class internalLinkTypeStory final : public InternalLinkType { } public: - string story_sender_username_; + string story_poster_username_; int32 story_id_; internalLinkTypeStory(); - internalLinkTypeStory(string const &story_sender_username_, int32 story_id_); + internalLinkTypeStory(string const &story_poster_username_, int32 story_id_); - static const std::int32_t ID = 1471997511; + static const std::int32_t ID = 1852042869; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -13064,6 +13328,70 @@ class internalLinkTypeWebApp final : public InternalLinkType { void store(TlStorerToString &s, const char *field_name) const final; }; +class InviteGroupCallParticipantResult: public Object { + public: +}; + +class inviteGroupCallParticipantResultUserPrivacyRestricted final : public InviteGroupCallParticipantResult { + std::int32_t get_id() const final { + return ID; + } + + public: + + inviteGroupCallParticipantResultUserPrivacyRestricted(); + + static const std::int32_t ID = 53003769; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class inviteGroupCallParticipantResultUserAlreadyParticipant final : public InviteGroupCallParticipantResult { + std::int32_t get_id() const final { + return ID; + } + + public: + + inviteGroupCallParticipantResultUserAlreadyParticipant(); + + static const std::int32_t ID = 661526151; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class inviteGroupCallParticipantResultUserWasBanned final : public InviteGroupCallParticipantResult { + std::int32_t get_id() const final { + return ID; + } + + public: + + inviteGroupCallParticipantResultUserWasBanned(); + + static const std::int32_t ID = -204345357; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class inviteGroupCallParticipantResultSuccess final : public InviteGroupCallParticipantResult { + std::int32_t get_id() const final { + return ID; + } + + public: + int53 chat_id_; + int53 message_id_; + + inviteGroupCallParticipantResultSuccess(); + + inviteGroupCallParticipantResultSuccess(int53 chat_id_, int53 message_id_); + + static const std::int32_t ID = -1914309427; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class InviteLinkChatType: public Object { public: }; @@ -13958,6 +14286,20 @@ class linkPreviewTypeExternalVideo final : public LinkPreviewType { void store(TlStorerToString &s, const char *field_name) const final; }; +class linkPreviewTypeGroupCall final : public LinkPreviewType { + std::int32_t get_id() const final { + return ID; + } + + public: + + linkPreviewTypeGroupCall(); + + static const std::int32_t ID = -1242459936; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class linkPreviewTypeInvoice final : public LinkPreviewType { std::int32_t get_id() const final { return ID; @@ -14071,14 +14413,14 @@ class linkPreviewTypeStory final : public LinkPreviewType { } public: - int53 story_sender_chat_id_; + int53 story_poster_chat_id_; int32 story_id_; linkPreviewTypeStory(); - linkPreviewTypeStory(int53 story_sender_chat_id_, int32 story_id_); + linkPreviewTypeStory(int53 story_poster_chat_id_, int32 story_id_); - static const std::int32_t ID = 513574862; + static const std::int32_t ID = 1045709531; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -15165,15 +15507,15 @@ class messageStory final : public MessageContent { } public: - int53 story_sender_chat_id_; + int53 story_poster_chat_id_; int32 story_id_; bool via_mention_; messageStory(); - messageStory(int53 story_sender_chat_id_, int32 story_id_, bool via_mention_); + messageStory(int53 story_poster_chat_id_, int32 story_id_, bool via_mention_); - static const std::int32_t ID = 858387156; + static const std::int32_t ID = 1514236353; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -15222,6 +15564,27 @@ class messageCall final : public MessageContent { void store(TlStorerToString &s, const char *field_name) const final; }; +class messageGroupCall final : public MessageContent { + std::int32_t get_id() const final { + return ID; + } + + public: + bool is_active_; + bool was_missed_; + bool is_video_; + int32 duration_; + array> other_participant_ids_; + + messageGroupCall(); + + messageGroupCall(bool is_active_, bool was_missed_, bool is_video_, int32 duration_, array> &&other_participant_ids_); + + static const std::int32_t ID = 1370396295; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class messageVideoChatScheduled final : public MessageContent { std::int32_t get_id() const final { return ID; @@ -15995,14 +16358,17 @@ class messageUpgradedGift final : public MessageContent { bool is_saved_; bool can_be_transferred_; bool was_transferred_; + int53 last_resale_star_count_; int53 transfer_star_count_; + int32 next_transfer_date_; + int32 next_resale_date_; int32 export_date_; messageUpgradedGift(); - messageUpgradedGift(object_ptr &&gift_, object_ptr &&sender_id_, string const &received_gift_id_, bool is_upgrade_, bool is_saved_, bool can_be_transferred_, bool was_transferred_, int53 transfer_star_count_, int32 export_date_); + messageUpgradedGift(object_ptr &&gift_, object_ptr &&sender_id_, string const &received_gift_id_, bool is_upgrade_, bool is_saved_, bool can_be_transferred_, bool was_transferred_, int53 last_resale_star_count_, int53 transfer_star_count_, int32 next_transfer_date_, int32 next_resale_date_, int32 export_date_); - static const std::int32_t ID = -1068647053; + static const std::int32_t ID = -1586797067; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -16822,14 +17188,14 @@ class messageReplyToStory final : public MessageReplyTo { } public: - int53 story_sender_chat_id_; + int53 story_poster_chat_id_; int32 story_id_; messageReplyToStory(); - messageReplyToStory(int53 story_sender_chat_id_, int32 story_id_); + messageReplyToStory(int53 story_poster_chat_id_, int32 story_id_); - static const std::int32_t ID = 1888266553; + static const std::int32_t ID = -674492596; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -20798,30 +21164,30 @@ class premiumLimitTypeActiveStoryCount final : public PremiumLimitType { void store(TlStorerToString &s, const char *field_name) const final; }; -class premiumLimitTypeWeeklySentStoryCount final : public PremiumLimitType { +class premiumLimitTypeWeeklyPostedStoryCount final : public PremiumLimitType { std::int32_t get_id() const final { return ID; } public: - premiumLimitTypeWeeklySentStoryCount(); + premiumLimitTypeWeeklyPostedStoryCount(); - static const std::int32_t ID = 40485707; + static const std::int32_t ID = -506354313; void store(TlStorerToString &s, const char *field_name) const final; }; -class premiumLimitTypeMonthlySentStoryCount final : public PremiumLimitType { +class premiumLimitTypeMonthlyPostedStoryCount final : public PremiumLimitType { std::int32_t get_id() const final { return ID; } public: - premiumLimitTypeMonthlySentStoryCount(); + premiumLimitTypeMonthlyPostedStoryCount(); - static const std::int32_t ID = 819481475; + static const std::int32_t ID = 26329490; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -22516,13 +22882,15 @@ class receivedGift final : public Object { int53 sell_star_count_; int53 prepaid_upgrade_star_count_; int53 transfer_star_count_; + int32 next_transfer_date_; + int32 next_resale_date_; int32 export_date_; receivedGift(); - receivedGift(string const &received_gift_id_, object_ptr &&sender_id_, object_ptr &&text_, bool is_private_, bool is_saved_, bool is_pinned_, bool can_be_upgraded_, bool can_be_transferred_, bool was_refunded_, int32 date_, object_ptr &&gift_, int53 sell_star_count_, int53 prepaid_upgrade_star_count_, int53 transfer_star_count_, int32 export_date_); + receivedGift(string const &received_gift_id_, object_ptr &&sender_id_, object_ptr &&text_, bool is_private_, bool is_saved_, bool is_pinned_, bool can_be_upgraded_, bool can_be_transferred_, bool was_refunded_, int32 date_, object_ptr &&gift_, int53 sell_star_count_, int53 prepaid_upgrade_star_count_, int53 transfer_star_count_, int32 next_transfer_date_, int32 next_resale_date_, int32 export_date_); - static const std::int32_t ID = 553476056; + static const std::int32_t ID = 61550296; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -23704,15 +24072,15 @@ class scopeNotificationSettings final : public Object { bool use_default_mute_stories_; bool mute_stories_; int64 story_sound_id_; - bool show_story_sender_; + bool show_story_poster_; bool disable_pinned_message_notifications_; bool disable_mention_notifications_; scopeNotificationSettings(); - scopeNotificationSettings(int32 mute_for_, int64 sound_id_, bool show_preview_, bool use_default_mute_stories_, bool mute_stories_, int64 story_sound_id_, bool show_story_sender_, bool disable_pinned_message_notifications_, bool disable_mention_notifications_); + scopeNotificationSettings(int32 mute_for_, int64 sound_id_, bool show_preview_, bool use_default_mute_stories_, bool mute_stories_, int64 story_sound_id_, bool show_story_poster_, bool disable_pinned_message_notifications_, bool disable_mention_notifications_); - static const std::int32_t ID = -599105185; + static const std::int32_t ID = 88369150; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -25440,6 +25808,43 @@ class starTransactionTypeGiftUpgrade final : public StarTransactionType { void store(TlStorerToString &s, const char *field_name) const final; }; +class starTransactionTypeUpgradedGiftPurchase final : public StarTransactionType { + std::int32_t get_id() const final { + return ID; + } + + public: + int53 user_id_; + object_ptr gift_; + + starTransactionTypeUpgradedGiftPurchase(); + + starTransactionTypeUpgradedGiftPurchase(int53 user_id_, object_ptr &&gift_); + + static const std::int32_t ID = -59050247; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class starTransactionTypeUpgradedGiftSale final : public StarTransactionType { + std::int32_t get_id() const final { + return ID; + } + + public: + int53 user_id_; + object_ptr gift_; + object_ptr affiliate_; + + starTransactionTypeUpgradedGiftSale(); + + starTransactionTypeUpgradedGiftSale(int53 user_id_, object_ptr &&gift_, object_ptr &&affiliate_); + + static const std::int32_t ID = 2041948603; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class starTransactionTypeChannelPaidReactionSend final : public StarTransactionType { std::int32_t get_id() const final { return ID; @@ -26316,10 +26721,10 @@ class story final : public Object { public: int32 id_; - int53 sender_chat_id_; - object_ptr sender_id_; + int53 poster_chat_id_; + object_ptr poster_id_; int32 date_; - bool is_being_sent_; + bool is_being_posted_; bool is_being_edited_; bool is_edited_; bool is_posted_to_chat_page_; @@ -26342,9 +26747,9 @@ class story final : public Object { story(); - story(int32 id_, int53 sender_chat_id_, object_ptr &&sender_id_, int32 date_, bool is_being_sent_, bool is_being_edited_, bool is_edited_, bool is_posted_to_chat_page_, bool is_visible_only_for_self_, bool can_be_deleted_, bool can_be_edited_, bool can_be_forwarded_, bool can_be_replied_, bool can_toggle_is_posted_to_chat_page_, bool can_get_statistics_, bool can_get_interactions_, bool has_expired_viewers_, object_ptr &&repost_info_, object_ptr &&interaction_info_, object_ptr &&chosen_reaction_type_, object_ptr &&privacy_settings_, object_ptr &&content_, array> &&areas_, object_ptr &&caption_); + story(int32 id_, int53 poster_chat_id_, object_ptr &&poster_id_, int32 date_, bool is_being_posted_, bool is_being_edited_, bool is_edited_, bool is_posted_to_chat_page_, bool is_visible_only_for_self_, bool can_be_deleted_, bool can_be_edited_, bool can_be_forwarded_, bool can_be_replied_, bool can_toggle_is_posted_to_chat_page_, bool can_get_statistics_, bool can_get_interactions_, bool has_expired_viewers_, object_ptr &&repost_info_, object_ptr &&interaction_info_, object_ptr &&chosen_reaction_type_, object_ptr &&privacy_settings_, object_ptr &&content_, array> &&areas_, object_ptr &&caption_); - static const std::int32_t ID = -294015331; + static const std::int32_t ID = 1206531707; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -26594,14 +26999,14 @@ class storyFullId final : public Object { } public: - int53 sender_chat_id_; + int53 poster_chat_id_; int32 story_id_; storyFullId(); - storyFullId(int53 sender_chat_id_, int32 story_id_); + storyFullId(int53 poster_chat_id_, int32 story_id_); - static const std::int32_t ID = 1880961525; + static const std::int32_t ID = 765952419; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -26815,13 +27220,13 @@ class storyOriginHiddenUser final : public StoryOrigin { } public: - string sender_name_; + string poster_name_; storyOriginHiddenUser(); - explicit storyOriginHiddenUser(string const &sender_name_); + explicit storyOriginHiddenUser(string const &poster_name_); - static const std::int32_t ID = 1512016364; + static const std::int32_t ID = -96348585; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -26967,6 +27372,8 @@ class storyVideo final : public Object { void store(TlStorerToString &s, const char *field_name) const final; }; +class formattedText; + class SuggestedAction: public Object { public: }; @@ -27176,6 +27583,26 @@ class suggestedActionExtendStarSubscriptions final : public SuggestedAction { void store(TlStorerToString &s, const char *field_name) const final; }; +class suggestedActionCustom final : public SuggestedAction { + std::int32_t get_id() const final { + return ID; + } + + public: + string name_; + object_ptr title_; + object_ptr description_; + string url_; + + suggestedActionCustom(); + + suggestedActionCustom(string const &name_, object_ptr &&title_, object_ptr &&description_, string const &url_); + + static const std::int32_t ID = 2092876611; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class ChatMemberStatus; class usernames; @@ -27194,6 +27621,7 @@ class supergroup final : public Object { object_ptr status_; int32 member_count_; int32 boost_level_; + bool has_automatic_translation_; bool has_linked_chat_; bool has_location_; bool sign_messages_; @@ -27213,9 +27641,9 @@ class supergroup final : public Object { supergroup(); - supergroup(int53 id_, object_ptr &&usernames_, int32 date_, object_ptr &&status_, int32 member_count_, int32 boost_level_, bool has_linked_chat_, bool has_location_, bool sign_messages_, bool show_message_sender_, bool join_to_send_messages_, bool join_by_request_, bool is_slow_mode_enabled_, bool is_channel_, bool is_broadcast_group_, bool is_forum_, object_ptr &&verification_status_, bool has_sensitive_content_, string const &restriction_reason_, int53 paid_message_star_count_, bool has_active_stories_, bool has_unread_active_stories_); + supergroup(int53 id_, object_ptr &&usernames_, int32 date_, object_ptr &&status_, int32 member_count_, int32 boost_level_, bool has_automatic_translation_, bool has_linked_chat_, bool has_location_, bool sign_messages_, bool show_message_sender_, bool join_to_send_messages_, bool join_by_request_, bool is_slow_mode_enabled_, bool is_channel_, bool is_broadcast_group_, bool is_forum_, object_ptr &&verification_status_, bool has_sensitive_content_, string const &restriction_reason_, int53 paid_message_star_count_, bool has_active_stories_, bool has_unread_active_stories_); - static const std::int32_t ID = 992231696; + static const std::int32_t ID = -1355919719; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -28763,7 +29191,7 @@ class BlockList; class CallbackQueryPayload; -class CanSendStoryResult; +class CanPostStoryResult; class ChatAction; @@ -29988,14 +30416,15 @@ class updateForumTopic final : public Update { int53 chat_id_; int53 message_thread_id_; bool is_pinned_; + int53 last_read_inbox_message_id_; int53 last_read_outbox_message_id_; object_ptr notification_settings_; updateForumTopic(); - updateForumTopic(int53 chat_id_, int53 message_thread_id_, bool is_pinned_, int53 last_read_outbox_message_id_, object_ptr &¬ification_settings_); + updateForumTopic(int53 chat_id_, int53 message_thread_id_, bool is_pinned_, int53 last_read_inbox_message_id_, int53 last_read_outbox_message_id_, object_ptr &¬ification_settings_); - static const std::int32_t ID = 807069971; + static const std::int32_t ID = 266794534; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -30529,6 +30958,43 @@ class updateGroupCallParticipant final : public Update { void store(TlStorerToString &s, const char *field_name) const final; }; +class updateGroupCallParticipants final : public Update { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 group_call_id_; + array participant_user_ids_; + + updateGroupCallParticipants(); + + updateGroupCallParticipants(int32 group_call_id_, array &&participant_user_ids_); + + static const std::int32_t ID = -1874006374; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class updateGroupCallVerificationState final : public Update { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 group_call_id_; + int32 generation_; + array emojis_; + + updateGroupCallVerificationState(); + + updateGroupCallVerificationState(int32 group_call_id_, int32 generation_, array &&emojis_); + + static const std::int32_t ID = 682965060; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class updateNewCallSignalingData final : public Update { std::int32_t get_id() const final { return ID; @@ -30629,19 +31095,19 @@ class updateStoryDeleted final : public Update { } public: - int53 story_sender_chat_id_; + int53 story_poster_chat_id_; int32 story_id_; updateStoryDeleted(); - updateStoryDeleted(int53 story_sender_chat_id_, int32 story_id_); + updateStoryDeleted(int53 story_poster_chat_id_, int32 story_id_); - static const std::int32_t ID = 1879567261; + static const std::int32_t ID = -582743166; void store(TlStorerToString &s, const char *field_name) const final; }; -class updateStorySendSucceeded final : public Update { +class updateStoryPostSucceeded final : public Update { std::int32_t get_id() const final { return ID; } @@ -30650,16 +31116,16 @@ class updateStorySendSucceeded final : public Update { object_ptr story_; int32 old_story_id_; - updateStorySendSucceeded(); + updateStoryPostSucceeded(); - updateStorySendSucceeded(object_ptr &&story_, int32 old_story_id_); + updateStoryPostSucceeded(object_ptr &&story_, int32 old_story_id_); - static const std::int32_t ID = -1188651433; + static const std::int32_t ID = -1712432318; void store(TlStorerToString &s, const char *field_name) const final; }; -class updateStorySendFailed final : public Update { +class updateStoryPostFailed final : public Update { std::int32_t get_id() const final { return ID; } @@ -30667,13 +31133,13 @@ class updateStorySendFailed final : public Update { public: object_ptr story_; object_ptr error_; - object_ptr error_type_; + object_ptr error_type_; - updateStorySendFailed(); + updateStoryPostFailed(); - updateStorySendFailed(object_ptr &&story_, object_ptr &&error_, object_ptr &&error_type_); + updateStoryPostFailed(object_ptr &&story_, object_ptr &&error_, object_ptr &&error_type_); - static const std::int32_t ID = -532221543; + static const std::int32_t ID = 1248168444; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -31817,13 +32283,15 @@ class upgradeGiftResult final : public Object { bool is_saved_; bool can_be_transferred_; int53 transfer_star_count_; + int32 next_transfer_date_; + int32 next_resale_date_; int32 export_date_; upgradeGiftResult(); - upgradeGiftResult(object_ptr &&gift_, string const &received_gift_id_, bool is_saved_, bool can_be_transferred_, int53 transfer_star_count_, int32 export_date_); + upgradeGiftResult(object_ptr &&gift_, string const &received_gift_id_, bool is_saved_, bool can_be_transferred_, int53 transfer_star_count_, int32 next_transfer_date_, int32 next_resale_date_, int32 export_date_); - static const std::int32_t ID = 664437354; + static const std::int32_t ID = 233376346; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -31858,12 +32326,68 @@ class upgradedGift final : public Object { object_ptr symbol_; object_ptr backdrop_; object_ptr original_details_; + int53 resale_star_count_; upgradedGift(); - upgradedGift(int64 id_, string const &title_, string const &name_, int32 number_, int32 total_upgraded_count_, int32 max_upgraded_count_, object_ptr &&owner_id_, string const &owner_address_, string const &owner_name_, string const &gift_address_, object_ptr &&model_, object_ptr &&symbol_, object_ptr &&backdrop_, object_ptr &&original_details_); + upgradedGift(int64 id_, string const &title_, string const &name_, int32 number_, int32 total_upgraded_count_, int32 max_upgraded_count_, object_ptr &&owner_id_, string const &owner_address_, string const &owner_name_, string const &gift_address_, object_ptr &&model_, object_ptr &&symbol_, object_ptr &&backdrop_, object_ptr &&original_details_, int53 resale_star_count_); - static const std::int32_t ID = -473646818; + static const std::int32_t ID = 992832410; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class UpgradedGiftAttributeId: public Object { + public: +}; + +class upgradedGiftAttributeIdModel final : public UpgradedGiftAttributeId { + std::int32_t get_id() const final { + return ID; + } + + public: + int64 sticker_id_; + + upgradedGiftAttributeIdModel(); + + explicit upgradedGiftAttributeIdModel(int64 sticker_id_); + + static const std::int32_t ID = 1053287307; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class upgradedGiftAttributeIdSymbol final : public UpgradedGiftAttributeId { + std::int32_t get_id() const final { + return ID; + } + + public: + int64 sticker_id_; + + upgradedGiftAttributeIdSymbol(); + + explicit upgradedGiftAttributeIdSymbol(int64 sticker_id_); + + static const std::int32_t ID = 1188205608; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class upgradedGiftAttributeIdBackdrop final : public UpgradedGiftAttributeId { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 backdrop_id_; + + upgradedGiftAttributeIdBackdrop(); + + explicit upgradedGiftAttributeIdBackdrop(int32 backdrop_id_); + + static const std::int32_t ID = 1461997935; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -31876,15 +32400,16 @@ class upgradedGiftBackdrop final : public Object { } public: + int32 id_; string name_; object_ptr colors_; int32 rarity_per_mille_; upgradedGiftBackdrop(); - upgradedGiftBackdrop(string const &name_, object_ptr &&colors_, int32 rarity_per_mille_); + upgradedGiftBackdrop(int32 id_, string const &name_, object_ptr &&colors_, int32 rarity_per_mille_); - static const std::int32_t ID = -334899886; + static const std::int32_t ID = -378289242; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -31909,6 +32434,26 @@ class upgradedGiftBackdropColors final : public Object { void store(TlStorerToString &s, const char *field_name) const final; }; +class upgradedGiftBackdrop; + +class upgradedGiftBackdropCount final : public Object { + std::int32_t get_id() const final { + return ID; + } + + public: + object_ptr backdrop_; + int32 total_count_; + + upgradedGiftBackdropCount(); + + upgradedGiftBackdropCount(object_ptr &&backdrop_, int32 total_count_); + + static const std::int32_t ID = -562274120; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class sticker; class upgradedGiftModel final : public Object { @@ -31930,6 +32475,26 @@ class upgradedGiftModel final : public Object { void store(TlStorerToString &s, const char *field_name) const final; }; +class upgradedGiftModel; + +class upgradedGiftModelCount final : public Object { + std::int32_t get_id() const final { + return ID; + } + + public: + object_ptr model_; + int32 total_count_; + + upgradedGiftModelCount(); + + upgradedGiftModelCount(object_ptr &&model_, int32 total_count_); + + static const std::int32_t ID = -1127238023; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class MessageSender; class formattedText; @@ -31975,6 +32540,26 @@ class upgradedGiftSymbol final : public Object { void store(TlStorerToString &s, const char *field_name) const final; }; +class upgradedGiftSymbol; + +class upgradedGiftSymbolCount final : public Object { + std::int32_t get_id() const final { + return ID; + } + + public: + object_ptr symbol_; + int32 total_count_; + + upgradedGiftSymbolCount(); + + upgradedGiftSymbolCount(object_ptr &&symbol_, int32 total_count_); + + static const std::int32_t ID = -773579874; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class UserStatus; class UserType; @@ -32871,6 +33456,44 @@ class videoChat final : public Object { void store(TlStorerToString &s, const char *field_name) const final; }; +class videoChatStream final : public Object { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 channel_id_; + int32 scale_; + int53 time_offset_; + + videoChatStream(); + + videoChatStream(int32 channel_id_, int32 scale_, int53 time_offset_); + + static const std::int32_t ID = -1151707172; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class videoChatStream; + +class videoChatStreams final : public Object { + std::int32_t get_id() const final { + return ID; + } + + public: + array> streams_; + + videoChatStreams(); + + explicit videoChatStreams(array> &&streams_); + + static const std::int32_t ID = -434622720; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class SpeechRecognitionResult; class file; @@ -33948,6 +34571,28 @@ class banChatMember final : public Function { class ok; +class banGroupCallParticipants final : public Function { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 group_call_id_; + array user_ids_; + + banGroupCallParticipants(); + + banGroupCallParticipants(int32 group_call_id_, array &&user_ids_); + + static const std::int32_t ID = 624883173; + + using ReturnType = object_ptr; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class ok; + class blockMessageSenderFromReplies final : public Function { std::int32_t get_id() const final { return ID; @@ -34013,6 +34658,27 @@ class canBotSendMessages final : public Function { void store(TlStorerToString &s, const char *field_name) const final; }; +class CanPostStoryResult; + +class canPostStory final : public Function { + std::int32_t get_id() const final { + return ID; + } + + public: + int53 chat_id_; + + canPostStory(); + + explicit canPostStory(int53 chat_id_); + + static const std::int32_t ID = 668621518; + + using ReturnType = object_ptr; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class StorePaymentPurpose; class ok; @@ -34058,27 +34724,6 @@ class canSendMessageToUser final : public Function { void store(TlStorerToString &s, const char *field_name) const final; }; -class CanSendStoryResult; - -class canSendStory final : public Function { - std::int32_t get_id() const final { - return ID; - } - - public: - int53 chat_id_; - - canSendStory(); - - explicit canSendStory(int53 chat_id_); - - static const std::int32_t ID = -1226825365; - - using ReturnType = object_ptr; - - void store(TlStorerToString &s, const char *field_name) const final; -}; - class CanTransferOwnershipResult; class canTransferOwnership final : public Function { @@ -34937,14 +35582,14 @@ class closeStory final : public Function { } public: - int53 story_sender_chat_id_; + int53 story_poster_chat_id_; int32 story_id_; closeStory(); - closeStory(int53 story_sender_chat_id_, int32 story_id_); + closeStory(int53 story_poster_chat_id_, int32 story_id_); - static const std::int32_t ID = 1144852309; + static const std::int32_t ID = 1553967851; using ReturnType = object_ptr; @@ -35118,13 +35763,12 @@ class createCall final : public Function { int53 user_id_; object_ptr protocol_; bool is_video_; - int32 group_call_id_; createCall(); - createCall(int53 user_id_, object_ptr &&protocol_, bool is_video_, int32 group_call_id_); + createCall(int53 user_id_, object_ptr &&protocol_, bool is_video_); - static const std::int32_t ID = -1270805351; + static const std::int32_t ID = -1104663024; using ReturnType = object_ptr; @@ -35252,7 +35896,9 @@ class createForumTopic final : public Function { void store(TlStorerToString &s, const char *field_name) const final; }; -class ok; +class groupCallInfo; + +class groupCallJoinParameters; class createGroupCall final : public Function { std::int32_t get_id() const final { @@ -35260,15 +35906,15 @@ class createGroupCall final : public Function { } public: - int32 call_id_; + object_ptr join_parameters_; createGroupCall(); - explicit createGroupCall(int32 call_id_); + explicit createGroupCall(object_ptr &&join_parameters_); - static const std::int32_t ID = -2017962501; + static const std::int32_t ID = 1930068672; - using ReturnType = object_ptr; + using ReturnType = object_ptr; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -35514,6 +36160,56 @@ class createVideoChat final : public Function { class ok; +class declineGroupCallInvitation final : public Function { + std::int32_t get_id() const final { + return ID; + } + + public: + int53 chat_id_; + int53 message_id_; + + declineGroupCallInvitation(); + + declineGroupCallInvitation(int53 chat_id_, int53 message_id_); + + static const std::int32_t ID = 1843919377; + + using ReturnType = object_ptr; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class GroupCallDataChannel; + +class MessageSender; + +class data; + +class decryptGroupCallData final : public Function { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 group_call_id_; + object_ptr participant_id_; + object_ptr data_channel_; + bytes data_; + + decryptGroupCallData(); + + decryptGroupCallData(int32 group_call_id_, object_ptr &&participant_id_, object_ptr &&data_channel_, bytes const &data_); + + static const std::int32_t ID = 1781743076; + + using ReturnType = object_ptr; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class ok; + class deleteAccount final : public Function { std::int32_t get_id() const final { return ID; @@ -36216,14 +36912,14 @@ class deleteStory final : public Function { } public: - int53 story_sender_chat_id_; + int53 story_poster_chat_id_; int32 story_id_; deleteStory(); - deleteStory(int53 story_sender_chat_id_, int32 story_id_); + deleteStory(int53 story_poster_chat_id_, int32 story_id_); - static const std::int32_t ID = -1623871722; + static const std::int32_t ID = -2020144472; using ReturnType = object_ptr; @@ -36297,15 +36993,16 @@ class discardCall final : public Function { public: int32 call_id_; bool is_disconnected_; + string invite_link_; int32 duration_; bool is_video_; int64 connection_id_; discardCall(); - discardCall(int32 call_id_, bool is_disconnected_, int32 duration_, bool is_video_, int64 connection_id_); + discardCall(int32 call_id_, bool is_disconnected_, string const &invite_link_, int32 duration_, bool is_video_, int64 connection_id_); - static const std::int32_t ID = -1784044162; + static const std::int32_t ID = -1545983346; using ReturnType = object_ptr; @@ -36612,7 +37309,7 @@ class editBusinessStory final : public Function { } public: - int53 story_sender_chat_id_; + int53 story_poster_chat_id_; int32 story_id_; object_ptr content_; object_ptr areas_; @@ -36621,9 +37318,9 @@ class editBusinessStory final : public Function { editBusinessStory(); - editBusinessStory(int53 story_sender_chat_id_, int32 story_id_, object_ptr &&content_, object_ptr &&areas_, object_ptr &&caption_, object_ptr &&privacy_settings_); + editBusinessStory(int53 story_poster_chat_id_, int32 story_id_, object_ptr &&content_, object_ptr &&areas_, object_ptr &&caption_, object_ptr &&privacy_settings_); - static const std::int32_t ID = -805339579; + static const std::int32_t ID = 472538940; using ReturnType = object_ptr; @@ -37165,7 +37862,7 @@ class editStory final : public Function { } public: - int53 story_sender_chat_id_; + int53 story_poster_chat_id_; int32 story_id_; object_ptr content_; object_ptr areas_; @@ -37173,9 +37870,9 @@ class editStory final : public Function { editStory(); - editStory(int53 story_sender_chat_id_, int32 story_id_, object_ptr &&content_, object_ptr &&areas_, object_ptr &&caption_); + editStory(int53 story_poster_chat_id_, int32 story_id_, object_ptr &&content_, object_ptr &&areas_, object_ptr &&caption_); - static const std::int32_t ID = 1584013745; + static const std::int32_t ID = 355296788; using ReturnType = object_ptr; @@ -37190,15 +37887,15 @@ class editStoryCover final : public Function { } public: - int53 story_sender_chat_id_; + int53 story_poster_chat_id_; int32 story_id_; double cover_frame_timestamp_; editStoryCover(); - editStoryCover(int53 story_sender_chat_id_, int32 story_id_, double cover_frame_timestamp_); + editStoryCover(int53 story_poster_chat_id_, int32 story_id_, double cover_frame_timestamp_); - static const std::int32_t ID = -1423307701; + static const std::int32_t ID = -1035823266; using ReturnType = object_ptr; @@ -37249,6 +37946,32 @@ class enableProxy final : public Function { void store(TlStorerToString &s, const char *field_name) const final; }; +class GroupCallDataChannel; + +class data; + +class encryptGroupCallData final : public Function { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 group_call_id_; + object_ptr data_channel_; + bytes data_; + int32 unencrypted_prefix_size_; + + encryptGroupCallData(); + + encryptGroupCallData(int32 group_call_id_, object_ptr &&data_channel_, bytes const &data_, int32 unencrypted_prefix_size_); + + static const std::int32_t ID = -377997690; + + using ReturnType = object_ptr; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class ok; class endGroupCall final : public Function { @@ -37662,7 +38385,7 @@ class getAvailableChatBoostSlots final : public Function { void store(TlStorerToString &s, const char *field_name) const final; }; -class gifts; +class availableGifts; class getAvailableGifts final : public Function { std::int32_t get_id() const final { @@ -37673,9 +38396,9 @@ class getAvailableGifts final : public Function { getAvailableGifts(); - static const std::int32_t ID = -153786901; + static const std::int32_t ID = -4559695; - using ReturnType = object_ptr; + using ReturnType = object_ptr; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -39103,7 +39826,7 @@ class getChatStoryInteractions final : public Function { } public: - int53 story_sender_chat_id_; + int53 story_poster_chat_id_; int32 story_id_; object_ptr reaction_type_; bool prefer_forwards_; @@ -39112,9 +39835,9 @@ class getChatStoryInteractions final : public Function { getChatStoryInteractions(); - getChatStoryInteractions(int53 story_sender_chat_id_, int32 story_id_, object_ptr &&reaction_type_, bool prefer_forwards_, string const &offset_, int32 limit_); + getChatStoryInteractions(int53 story_poster_chat_id_, int32 story_id_, object_ptr &&reaction_type_, bool prefer_forwards_, string const &offset_, int32 limit_); - static const std::int32_t ID = -974359690; + static const std::int32_t ID = 354545268; using ReturnType = object_ptr; @@ -39168,16 +39891,16 @@ class getChatsForChatFolderInviteLink final : public Function { class chats; -class getChatsToSendStories final : public Function { +class getChatsToPostStories final : public Function { std::int32_t get_id() const final { return ID; } public: - getChatsToSendStories(); + getChatsToPostStories(); - static const std::int32_t ID = 586802084; + static const std::int32_t ID = 1893901427; using ReturnType = object_ptr; @@ -40085,72 +40808,26 @@ class getGroupCall final : public Function { void store(TlStorerToString &s, const char *field_name) const final; }; -class httpUrl; +class InputGroupCall; -class getGroupCallInviteLink final : public Function { +class groupCallParticipants; + +class getGroupCallParticipants final : public Function { std::int32_t get_id() const final { return ID; } public: - int32 group_call_id_; - bool can_self_unmute_; + object_ptr input_group_call_; + int32 limit_; - getGroupCallInviteLink(); + getGroupCallParticipants(); - getGroupCallInviteLink(int32 group_call_id_, bool can_self_unmute_); + getGroupCallParticipants(object_ptr &&input_group_call_, int32 limit_); - static const std::int32_t ID = 719407396; + static const std::int32_t ID = 1986739394; - using ReturnType = object_ptr; - - void store(TlStorerToString &s, const char *field_name) const final; -}; - -class GroupCallVideoQuality; - -class filePart; - -class getGroupCallStreamSegment final : public Function { - std::int32_t get_id() const final { - return ID; - } - - public: - int32 group_call_id_; - int53 time_offset_; - int32 scale_; - int32 channel_id_; - object_ptr video_quality_; - - getGroupCallStreamSegment(); - - getGroupCallStreamSegment(int32 group_call_id_, int53 time_offset_, int32 scale_, int32 channel_id_, object_ptr &&video_quality_); - - static const std::int32_t ID = -2077959515; - - using ReturnType = object_ptr; - - void store(TlStorerToString &s, const char *field_name) const final; -}; - -class groupCallStreams; - -class getGroupCallStreams final : public Function { - std::int32_t get_id() const final { - return ID; - } - - public: - int32 group_call_id_; - - getGroupCallStreams(); - - explicit getGroupCallStreams(int32 group_call_id_); - - static const std::int32_t ID = -1619226268; - - using ReturnType = object_ptr; + using ReturnType = object_ptr; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -42633,15 +43310,15 @@ class getStory final : public Function { } public: - int53 story_sender_chat_id_; + int53 story_poster_chat_id_; int32 story_id_; bool only_local_; getStory(); - getStory(int53 story_sender_chat_id_, int32 story_id_, bool only_local_); + getStory(int53 story_poster_chat_id_, int32 story_id_, bool only_local_); - static const std::int32_t ID = 1903893624; + static const std::int32_t ID = -2011076366; using ReturnType = object_ptr; @@ -42722,16 +43399,16 @@ class getStoryPublicForwards final : public Function { } public: - int53 story_sender_chat_id_; + int53 story_poster_chat_id_; int32 story_id_; string offset_; int32 limit_; getStoryPublicForwards(); - getStoryPublicForwards(int53 story_sender_chat_id_, int32 story_id_, string const &offset_, int32 limit_); + getStoryPublicForwards(int53 story_poster_chat_id_, int32 story_id_, string const &offset_, int32 limit_); - static const std::int32_t ID = 1761074363; + static const std::int32_t ID = 1810378546; using ReturnType = object_ptr; @@ -43340,6 +44017,28 @@ class getVideoChatAvailableParticipants final : public Function { void store(TlStorerToString &s, const char *field_name) const final; }; +class httpUrl; + +class getVideoChatInviteLink final : public Function { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 group_call_id_; + bool can_self_unmute_; + + getVideoChatInviteLink(); + + getVideoChatInviteLink(int32 group_call_id_, bool can_self_unmute_); + + static const std::int32_t ID = -1394707321; + + using ReturnType = object_ptr; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class rtmpUrl; class getVideoChatRtmpUrl final : public Function { @@ -43361,6 +44060,54 @@ class getVideoChatRtmpUrl final : public Function { void store(TlStorerToString &s, const char *field_name) const final; }; +class GroupCallVideoQuality; + +class data; + +class getVideoChatStreamSegment final : public Function { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 group_call_id_; + int53 time_offset_; + int32 scale_; + int32 channel_id_; + object_ptr video_quality_; + + getVideoChatStreamSegment(); + + getVideoChatStreamSegment(int32 group_call_id_, int53 time_offset_, int32 scale_, int32 channel_id_, object_ptr &&video_quality_); + + static const std::int32_t ID = 773343220; + + using ReturnType = object_ptr; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class videoChatStreams; + +class getVideoChatStreams final : public Function { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 group_call_id_; + + getVideoChatStreams(); + + explicit getVideoChatStreams(int32 group_call_id_); + + static const std::int32_t ID = 531757765; + + using ReturnType = object_ptr; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class httpUrl; class webAppOpenParameters; @@ -43572,9 +44319,32 @@ class importMessages final : public Function { void store(TlStorerToString &s, const char *field_name) const final; }; +class InviteGroupCallParticipantResult; + +class inviteGroupCallParticipant final : public Function { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 group_call_id_; + int53 user_id_; + bool is_video_; + + inviteGroupCallParticipant(); + + inviteGroupCallParticipant(int32 group_call_id_, int53 user_id_, bool is_video_); + + static const std::int32_t ID = -631535414; + + using ReturnType = object_ptr; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class ok; -class inviteGroupCallParticipants final : public Function { +class inviteVideoChatParticipants final : public Function { std::int32_t get_id() const final { return ID; } @@ -43583,11 +44353,11 @@ class inviteGroupCallParticipants final : public Function { int32 group_call_id_; array user_ids_; - inviteGroupCallParticipants(); + inviteVideoChatParticipants(); - inviteGroupCallParticipants(int32 group_call_id_, array &&user_ids_); + inviteVideoChatParticipants(int32 group_call_id_, array &&user_ids_); - static const std::int32_t ID = 1867097679; + static const std::int32_t ID = -473149298; using ReturnType = object_ptr; @@ -43636,9 +44406,11 @@ class joinChatByInviteLink final : public Function { void store(TlStorerToString &s, const char *field_name) const final; }; -class MessageSender; +class InputGroupCall; -class text; +class groupCallInfo; + +class groupCallJoinParameters; class joinGroupCall final : public Function { std::int32_t get_id() const final { @@ -43646,20 +44418,42 @@ class joinGroupCall final : public Function { } public: - int32 group_call_id_; - object_ptr participant_id_; - int32 audio_source_id_; - string payload_; - bool is_muted_; - bool is_my_video_enabled_; - string invite_hash_; - int64 key_fingerprint_; + object_ptr input_group_call_; + object_ptr join_parameters_; joinGroupCall(); - joinGroupCall(int32 group_call_id_, object_ptr &&participant_id_, int32 audio_source_id_, string const &payload_, bool is_muted_, bool is_my_video_enabled_, string const &invite_hash_, int64 key_fingerprint_); + joinGroupCall(object_ptr &&input_group_call_, object_ptr &&join_parameters_); - static const std::int32_t ID = -1600024255; + static const std::int32_t ID = -2026079917; + + using ReturnType = object_ptr; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class MessageSender; + +class groupCallJoinParameters; + +class text; + +class joinVideoChat final : public Function { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 group_call_id_; + object_ptr participant_id_; + object_ptr join_parameters_; + string invite_hash_; + + joinVideoChat(); + + joinVideoChat(int32 group_call_id_, object_ptr &&participant_id_, object_ptr &&join_parameters_, string const &invite_hash_); + + static const std::int32_t ID = 1322989999; using ReturnType = object_ptr; @@ -43997,14 +44791,14 @@ class openStory final : public Function { } public: - int53 story_sender_chat_id_; + int53 story_poster_chat_id_; int32 story_id_; openStory(); - openStory(int53 story_sender_chat_id_, int32 story_id_); + openStory(int53 story_poster_chat_id_, int32 story_id_); - static const std::int32_t ID = -824542083; + static const std::int32_t ID = -696723005; using ReturnType = object_ptr; @@ -44162,6 +44956,45 @@ class pingProxy final : public Function { void store(TlStorerToString &s, const char *field_name) const final; }; +class InputStoryContent; + +class StoryPrivacySettings; + +class formattedText; + +class inputStoryAreas; + +class story; + +class storyFullId; + +class postStory final : public Function { + std::int32_t get_id() const final { + return ID; + } + + public: + int53 chat_id_; + object_ptr content_; + object_ptr areas_; + object_ptr caption_; + object_ptr privacy_settings_; + int32 active_period_; + object_ptr from_story_full_id_; + bool is_posted_to_chat_page_; + bool protect_content_; + + postStory(); + + postStory(int53 chat_id_, object_ptr &&content_, object_ptr &&areas_, object_ptr &&caption_, object_ptr &&privacy_settings_, int32 active_period_, object_ptr &&from_story_full_id_, bool is_posted_to_chat_page_, bool protect_content_); + + static const std::int32_t ID = -257605513; + + using ReturnType = object_ptr; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class FileType; class InputFile; @@ -44433,7 +45266,7 @@ class readChatList final : public Function { void store(TlStorerToString &s, const char *field_name) const final; }; -class filePart; +class data; class readFilePart final : public Function { std::int32_t get_id() const final { @@ -44449,9 +45282,9 @@ class readFilePart final : public Function { readFilePart(int32 file_id_, int53 offset_, int53 count_); - static const std::int32_t ID = 906798861; + static const std::int32_t ID = -174576822; - using ReturnType = object_ptr; + using ReturnType = object_ptr; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -45476,16 +46309,16 @@ class reportStory final : public Function { } public: - int53 story_sender_chat_id_; + int53 story_poster_chat_id_; int32 story_id_; bytes option_id_; string text_; reportStory(); - reportStory(int53 story_sender_chat_id_, int32 story_id_, bytes const &option_id_, string const &text_); + reportStory(int53 story_poster_chat_id_, int32 story_id_, bytes const &option_id_, string const &text_); - static const std::int32_t ID = 2027844368; + static const std::int32_t ID = 1823256372; using ReturnType = object_ptr; @@ -46213,6 +47046,35 @@ class searchFileDownloads final : public Function { void store(TlStorerToString &s, const char *field_name) const final; }; +class GiftForResaleOrder; + +class UpgradedGiftAttributeId; + +class giftsForResale; + +class searchGiftsForResale final : public Function { + std::int32_t get_id() const final { + return ID; + } + + public: + int64 gift_id_; + object_ptr order_; + array> attributes_; + string offset_; + int32 limit_; + + searchGiftsForResale(); + + searchGiftsForResale(int64 gift_id_, object_ptr &&order_, array> &&attributes_, string const &offset_, int32 limit_); + + static const std::int32_t ID = 1659300894; + + using ReturnType = object_ptr; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class hashtags; class searchHashtags final : public Function { @@ -46414,16 +47276,16 @@ class searchPublicStoriesByTag final : public Function { } public: - int53 story_sender_chat_id_; + int53 story_poster_chat_id_; string tag_; string offset_; int32 limit_; searchPublicStoriesByTag(); - searchPublicStoriesByTag(int53 story_sender_chat_id_, string const &tag_, string const &offset_, int32 limit_); + searchPublicStoriesByTag(int53 story_poster_chat_id_, string const &tag_, string const &offset_, int32 limit_); - static const std::int32_t ID = -1563792893; + static const std::int32_t ID = 1778102602; using ReturnType = object_ptr; @@ -47263,41 +48125,27 @@ class sendQuickReplyShortcutMessages final : public Function { void store(TlStorerToString &s, const char *field_name) const final; }; -class InputStoryContent; +class MessageSender; -class StoryPrivacySettings; +class ok; -class formattedText; - -class inputStoryAreas; - -class story; - -class storyFullId; - -class sendStory final : public Function { +class sendResoldGift final : public Function { std::int32_t get_id() const final { return ID; } public: - int53 chat_id_; - object_ptr content_; - object_ptr areas_; - object_ptr caption_; - object_ptr privacy_settings_; - int32 active_period_; - object_ptr from_story_full_id_; - bool is_posted_to_chat_page_; - bool protect_content_; + string gift_name_; + object_ptr owner_id_; + int53 star_count_; - sendStory(); + sendResoldGift(); - sendStory(int53 chat_id_, object_ptr &&content_, object_ptr &&areas_, object_ptr &&caption_, object_ptr &&privacy_settings_, int32 active_period_, object_ptr &&from_story_full_id_, bool is_posted_to_chat_page_, bool protect_content_); + sendResoldGift(string const &gift_name_, object_ptr &&owner_id_, int53 star_count_); - static const std::int32_t ID = -424987902; + static const std::int32_t ID = -1284812948; - using ReturnType = object_ptr; + using ReturnType = object_ptr; void store(TlStorerToString &s, const char *field_name) const final; }; @@ -48917,6 +49765,28 @@ class setGameScore final : public Function { void store(TlStorerToString &s, const char *field_name) const final; }; +class ok; + +class setGiftResalePrice final : public Function { + std::int32_t get_id() const final { + return ID; + } + + public: + string received_gift_id_; + int53 resale_star_count_; + + setGiftResalePrice(); + + setGiftResalePrice(string const &received_gift_id_, int53 resale_star_count_); + + static const std::int32_t ID = -1430492787; + + using ReturnType = object_ptr; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class giftSettings; class ok; @@ -48990,28 +49860,6 @@ class setGroupCallParticipantVolumeLevel final : public Function { class ok; -class setGroupCallTitle final : public Function { - std::int32_t get_id() const final { - return ID; - } - - public: - int32 group_call_id_; - string title_; - - setGroupCallTitle(); - - setGroupCallTitle(int32 group_call_id_, string const &title_); - - static const std::int32_t ID = -1228825139; - - using ReturnType = object_ptr; - - void store(TlStorerToString &s, const char *field_name) const final; -}; - -class ok; - class setInactiveSessionTtl final : public Function { std::int32_t get_id() const final { return ID; @@ -49962,16 +50810,16 @@ class setStoryReaction final : public Function { } public: - int53 story_sender_chat_id_; + int53 story_poster_chat_id_; int32 story_id_; object_ptr reaction_type_; bool update_recent_reactions_; setStoryReaction(); - setStoryReaction(int53 story_sender_chat_id_, int32 story_id_, object_ptr &&reaction_type_, bool update_recent_reactions_); + setStoryReaction(int53 story_poster_chat_id_, int32 story_id_, object_ptr &&reaction_type_, bool update_recent_reactions_); - static const std::int32_t ID = -1400156249; + static const std::int32_t ID = 250731529; using ReturnType = object_ptr; @@ -50245,6 +51093,28 @@ class setVideoChatDefaultParticipant final : public Function { class ok; +class setVideoChatTitle final : public Function { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 group_call_id_; + string title_; + + setVideoChatTitle(); + + setVideoChatTitle(int32 group_call_id_, string const &title_); + + static const std::int32_t ID = 1915482994; + + using ReturnType = object_ptr; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class ok; + class shareChatWithBot final : public Function { std::int32_t get_id() const final { return ID; @@ -50363,7 +51233,7 @@ class startGroupCallScreenSharing final : public Function { class ok; -class startScheduledGroupCall final : public Function { +class startScheduledVideoChat final : public Function { std::int32_t get_id() const final { return ID; } @@ -50371,11 +51241,11 @@ class startScheduledGroupCall final : public Function { public: int32 group_call_id_; - startScheduledGroupCall(); + startScheduledVideoChat(); - explicit startScheduledGroupCall(int32 group_call_id_); + explicit startScheduledVideoChat(int32 group_call_id_); - static const std::int32_t ID = 1519938838; + static const std::int32_t ID = -1300829822; using ReturnType = object_ptr; @@ -51191,28 +52061,6 @@ class toggleGiftIsSaved final : public Function { class ok; -class toggleGroupCallEnabledStartNotification final : public Function { - std::int32_t get_id() const final { - return ID; - } - - public: - int32 group_call_id_; - bool enabled_start_notification_; - - toggleGroupCallEnabledStartNotification(); - - toggleGroupCallEnabledStartNotification(int32 group_call_id_, bool enabled_start_notification_); - - static const std::int32_t ID = 707839826; - - using ReturnType = object_ptr; - - void store(TlStorerToString &s, const char *field_name) const final; -}; - -class ok; - class toggleGroupCallIsMyVideoEnabled final : public Function { std::int32_t get_id() const final { return ID; @@ -51255,28 +52103,6 @@ class toggleGroupCallIsMyVideoPaused final : public Function { void store(TlStorerToString &s, const char *field_name) const final; }; -class ok; - -class toggleGroupCallMuteNewParticipants final : public Function { - std::int32_t get_id() const final { - return ID; - } - - public: - int32 group_call_id_; - bool mute_new_participants_; - - toggleGroupCallMuteNewParticipants(); - - toggleGroupCallMuteNewParticipants(int32 group_call_id_, bool mute_new_participants_); - - static const std::int32_t ID = 284082626; - - using ReturnType = object_ptr; - - void store(TlStorerToString &s, const char *field_name) const final; -}; - class MessageSender; class ok; @@ -51444,15 +52270,15 @@ class toggleStoryIsPostedToChatPage final : public Function { } public: - int53 story_sender_chat_id_; + int53 story_poster_chat_id_; int32 story_id_; bool is_posted_to_chat_page_; toggleStoryIsPostedToChatPage(); - toggleStoryIsPostedToChatPage(int53 story_sender_chat_id_, int32 story_id_, bool is_posted_to_chat_page_); + toggleStoryIsPostedToChatPage(int53 story_poster_chat_id_, int32 story_id_, bool is_posted_to_chat_page_); - static const std::int32_t ID = -300987649; + static const std::int32_t ID = -2141806228; using ReturnType = object_ptr; @@ -51505,6 +52331,28 @@ class toggleSupergroupHasAggressiveAntiSpamEnabled final : public Function { class ok; +class toggleSupergroupHasAutomaticTranslation final : public Function { + std::int32_t get_id() const final { + return ID; + } + + public: + int53 supergroup_id_; + bool has_automatic_translation_; + + toggleSupergroupHasAutomaticTranslation(); + + toggleSupergroupHasAutomaticTranslation(int53 supergroup_id_, bool has_automatic_translation_); + + static const std::int32_t ID = -184993048; + + using ReturnType = object_ptr; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class ok; + class toggleSupergroupHasHiddenMembers final : public Function { std::int32_t get_id() const final { return ID; @@ -51704,6 +52552,50 @@ class toggleUsernameIsActive final : public Function { class ok; +class toggleVideoChatEnabledStartNotification final : public Function { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 group_call_id_; + bool enabled_start_notification_; + + toggleVideoChatEnabledStartNotification(); + + toggleVideoChatEnabledStartNotification(int32 group_call_id_, bool enabled_start_notification_); + + static const std::int32_t ID = 1851489086; + + using ReturnType = object_ptr; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class ok; + +class toggleVideoChatMuteNewParticipants final : public Function { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 group_call_id_; + bool mute_new_participants_; + + toggleVideoChatMuteNewParticipants(); + + toggleVideoChatMuteNewParticipants(int32 group_call_id_, bool mute_new_participants_); + + static const std::int32_t ID = 987023756; + + using ReturnType = object_ptr; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class ok; + class transferBusinessAccountStars final : public Function { std::int32_t get_id() const final { return ID; diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/generate/auto/td/telegram/td_api_json.h b/third-party/td/TdBinding/SharedHeaders/td/td/generate/auto/td/telegram/td_api_json.h index 52d31007d5..5c72d2ba48 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/generate/auto/td/telegram/td_api_json.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/generate/auto/td/telegram/td_api_json.h @@ -64,6 +64,10 @@ Result tl_constructor_from_string(td_api::FileType *object, const std::st Result tl_constructor_from_string(td_api::FirebaseAuthenticationSettings *object, const std::string &str); +Result tl_constructor_from_string(td_api::GiftForResaleOrder *object, const std::string &str); + +Result tl_constructor_from_string(td_api::GroupCallDataChannel *object, const std::string &str); + Result tl_constructor_from_string(td_api::GroupCallVideoQuality *object, const std::string &str); Result tl_constructor_from_string(td_api::InlineKeyboardButtonType *object, const std::string &str); @@ -78,6 +82,8 @@ Result tl_constructor_from_string(td_api::InputCredentials *object, const Result tl_constructor_from_string(td_api::InputFile *object, const std::string &str); +Result tl_constructor_from_string(td_api::InputGroupCall *object, const std::string &str); + Result tl_constructor_from_string(td_api::InputInlineQueryResult *object, const std::string &str); Result tl_constructor_from_string(td_api::InputInvoice *object, const std::string &str); @@ -186,6 +192,8 @@ Result tl_constructor_from_string(td_api::TextParseMode *object, const st Result tl_constructor_from_string(td_api::TopChatCategory *object, const std::string &str); +Result tl_constructor_from_string(td_api::UpgradedGiftAttributeId *object, const std::string &str); + Result tl_constructor_from_string(td_api::UserPrivacySetting *object, const std::string &str); Result tl_constructor_from_string(td_api::UserPrivacySettingRule *object, const std::string &str); @@ -538,10 +546,22 @@ Status from_json(td_api::formattedText &to, JsonObject &from); Status from_json(td_api::forumTopicIcon &to, JsonObject &from); +Status from_json(td_api::giftForResaleOrderPrice &to, JsonObject &from); + +Status from_json(td_api::giftForResaleOrderPriceChangeDate &to, JsonObject &from); + +Status from_json(td_api::giftForResaleOrderNumber &to, JsonObject &from); + Status from_json(td_api::giftSettings &to, JsonObject &from); Status from_json(td_api::giveawayParameters &to, JsonObject &from); +Status from_json(td_api::groupCallDataChannelMain &to, JsonObject &from); + +Status from_json(td_api::groupCallDataChannelScreenSharing &to, JsonObject &from); + +Status from_json(td_api::groupCallJoinParameters &to, JsonObject &from); + Status from_json(td_api::groupCallVideoQualityThumbnail &to, JsonObject &from); Status from_json(td_api::groupCallVideoQualityMedium &to, JsonObject &from); @@ -610,6 +630,10 @@ Status from_json(td_api::inputFileLocal &to, JsonObject &from); Status from_json(td_api::inputFileGenerated &to, JsonObject &from); +Status from_json(td_api::inputGroupCallLink &to, JsonObject &from); + +Status from_json(td_api::inputGroupCallMessage &to, JsonObject &from); + Status from_json(td_api::inputIdentityDocument &to, JsonObject &from); Status from_json(td_api::inputInlineQueryResultAnimation &to, JsonObject &from); @@ -806,6 +830,8 @@ Status from_json(td_api::internalLinkTypeEditProfileSettings &to, JsonObject &fr Status from_json(td_api::internalLinkTypeGame &to, JsonObject &from); +Status from_json(td_api::internalLinkTypeGroupCall &to, JsonObject &from); + Status from_json(td_api::internalLinkTypeInstantView &to, JsonObject &from); Status from_json(td_api::internalLinkTypeInvoice &to, JsonObject &from); @@ -820,6 +846,8 @@ Status from_json(td_api::internalLinkTypeMessage &to, JsonObject &from); Status from_json(td_api::internalLinkTypeMessageDraft &to, JsonObject &from); +Status from_json(td_api::internalLinkTypeMyStars &to, JsonObject &from); + Status from_json(td_api::internalLinkTypePassportDataRequest &to, JsonObject &from); Status from_json(td_api::internalLinkTypePhoneNumberConfirmation &to, JsonObject &from); @@ -1124,9 +1152,9 @@ Status from_json(td_api::premiumLimitTypeShareableChatFolderCount &to, JsonObjec Status from_json(td_api::premiumLimitTypeActiveStoryCount &to, JsonObject &from); -Status from_json(td_api::premiumLimitTypeWeeklySentStoryCount &to, JsonObject &from); +Status from_json(td_api::premiumLimitTypeWeeklyPostedStoryCount &to, JsonObject &from); -Status from_json(td_api::premiumLimitTypeMonthlySentStoryCount &to, JsonObject &from); +Status from_json(td_api::premiumLimitTypeMonthlyPostedStoryCount &to, JsonObject &from); Status from_json(td_api::premiumLimitTypeStoryCaptionLength &to, JsonObject &from); @@ -1344,6 +1372,8 @@ Status from_json(td_api::suggestedActionExtendPremium &to, JsonObject &from); Status from_json(td_api::suggestedActionExtendStarSubscriptions &to, JsonObject &from); +Status from_json(td_api::suggestedActionCustom &to, JsonObject &from); + Status from_json(td_api::supergroupMembersFilterRecent &to, JsonObject &from); Status from_json(td_api::supergroupMembersFilterContacts &to, JsonObject &from); @@ -1454,6 +1484,12 @@ Status from_json(td_api::topChatCategoryCalls &to, JsonObject &from); Status from_json(td_api::topChatCategoryForwardChats &to, JsonObject &from); +Status from_json(td_api::upgradedGiftAttributeIdModel &to, JsonObject &from); + +Status from_json(td_api::upgradedGiftAttributeIdSymbol &to, JsonObject &from); + +Status from_json(td_api::upgradedGiftAttributeIdBackdrop &to, JsonObject &from); + Status from_json(td_api::upgradedGiftBackdropColors &to, JsonObject &from); Status from_json(td_api::userPrivacySettingShowStatus &to, JsonObject &from); @@ -1590,18 +1626,20 @@ Status from_json(td_api::assignStoreTransaction &to, JsonObject &from); Status from_json(td_api::banChatMember &to, JsonObject &from); +Status from_json(td_api::banGroupCallParticipants &to, JsonObject &from); + Status from_json(td_api::blockMessageSenderFromReplies &to, JsonObject &from); Status from_json(td_api::boostChat &to, JsonObject &from); Status from_json(td_api::canBotSendMessages &to, JsonObject &from); +Status from_json(td_api::canPostStory &to, JsonObject &from); + Status from_json(td_api::canPurchaseFromStore &to, JsonObject &from); Status from_json(td_api::canSendMessageToUser &to, JsonObject &from); -Status from_json(td_api::canSendStory &to, JsonObject &from); - Status from_json(td_api::canTransferOwnership &to, JsonObject &from); Status from_json(td_api::cancelDownloadFile &to, JsonObject &from); @@ -1734,6 +1772,10 @@ Status from_json(td_api::createTemporaryPassword &to, JsonObject &from); Status from_json(td_api::createVideoChat &to, JsonObject &from); +Status from_json(td_api::declineGroupCallInvitation &to, JsonObject &from); + +Status from_json(td_api::decryptGroupCallData &to, JsonObject &from); + Status from_json(td_api::deleteAccount &to, JsonObject &from); Status from_json(td_api::deleteAllCallMessages &to, JsonObject &from); @@ -1880,6 +1922,8 @@ Status from_json(td_api::editUserStarSubscription &to, JsonObject &from); Status from_json(td_api::enableProxy &to, JsonObject &from); +Status from_json(td_api::encryptGroupCallData &to, JsonObject &from); + Status from_json(td_api::endGroupCall &to, JsonObject &from); Status from_json(td_api::endGroupCallRecording &to, JsonObject &from); @@ -2054,7 +2098,7 @@ Status from_json(td_api::getChats &to, JsonObject &from); Status from_json(td_api::getChatsForChatFolderInviteLink &to, JsonObject &from); -Status from_json(td_api::getChatsToSendStories &to, JsonObject &from); +Status from_json(td_api::getChatsToPostStories &to, JsonObject &from); Status from_json(td_api::getCloseFriends &to, JsonObject &from); @@ -2144,11 +2188,7 @@ Status from_json(td_api::getGrossingWebAppBots &to, JsonObject &from); Status from_json(td_api::getGroupCall &to, JsonObject &from); -Status from_json(td_api::getGroupCallInviteLink &to, JsonObject &from); - -Status from_json(td_api::getGroupCallStreamSegment &to, JsonObject &from); - -Status from_json(td_api::getGroupCallStreams &to, JsonObject &from); +Status from_json(td_api::getGroupCallParticipants &to, JsonObject &from); Status from_json(td_api::getGroupsInCommon &to, JsonObject &from); @@ -2446,8 +2486,14 @@ Status from_json(td_api::getUserSupportInfo &to, JsonObject &from); Status from_json(td_api::getVideoChatAvailableParticipants &to, JsonObject &from); +Status from_json(td_api::getVideoChatInviteLink &to, JsonObject &from); + Status from_json(td_api::getVideoChatRtmpUrl &to, JsonObject &from); +Status from_json(td_api::getVideoChatStreamSegment &to, JsonObject &from); + +Status from_json(td_api::getVideoChatStreams &to, JsonObject &from); + Status from_json(td_api::getWebAppLinkUrl &to, JsonObject &from); Status from_json(td_api::getWebAppPlaceholder &to, JsonObject &from); @@ -2466,7 +2512,9 @@ Status from_json(td_api::importContacts &to, JsonObject &from); Status from_json(td_api::importMessages &to, JsonObject &from); -Status from_json(td_api::inviteGroupCallParticipants &to, JsonObject &from); +Status from_json(td_api::inviteGroupCallParticipant &to, JsonObject &from); + +Status from_json(td_api::inviteVideoChatParticipants &to, JsonObject &from); Status from_json(td_api::joinChat &to, JsonObject &from); @@ -2474,6 +2522,8 @@ Status from_json(td_api::joinChatByInviteLink &to, JsonObject &from); Status from_json(td_api::joinGroupCall &to, JsonObject &from); +Status from_json(td_api::joinVideoChat &to, JsonObject &from); + Status from_json(td_api::launchPrepaidGiveaway &to, JsonObject &from); Status from_json(td_api::leaveChat &to, JsonObject &from); @@ -2518,6 +2568,8 @@ Status from_json(td_api::pinChatMessage &to, JsonObject &from); Status from_json(td_api::pingProxy &to, JsonObject &from); +Status from_json(td_api::postStory &to, JsonObject &from); + Status from_json(td_api::preliminaryUploadFile &to, JsonObject &from); Status from_json(td_api::processChatFolderNewChats &to, JsonObject &from); @@ -2702,6 +2754,8 @@ Status from_json(td_api::searchEmojis &to, JsonObject &from); Status from_json(td_api::searchFileDownloads &to, JsonObject &from); +Status from_json(td_api::searchGiftsForResale &to, JsonObject &from); + Status from_json(td_api::searchHashtags &to, JsonObject &from); Status from_json(td_api::searchInstalledStickerSets &to, JsonObject &from); @@ -2786,7 +2840,7 @@ Status from_json(td_api::sendPhoneNumberFirebaseSms &to, JsonObject &from); Status from_json(td_api::sendQuickReplyShortcutMessages &to, JsonObject &from); -Status from_json(td_api::sendStory &to, JsonObject &from); +Status from_json(td_api::sendResoldGift &to, JsonObject &from); Status from_json(td_api::sendWebAppCustomRequest &to, JsonObject &from); @@ -2926,14 +2980,14 @@ Status from_json(td_api::setForumTopicNotificationSettings &to, JsonObject &from Status from_json(td_api::setGameScore &to, JsonObject &from); +Status from_json(td_api::setGiftResalePrice &to, JsonObject &from); + Status from_json(td_api::setGiftSettings &to, JsonObject &from); Status from_json(td_api::setGroupCallParticipantIsSpeaking &to, JsonObject &from); Status from_json(td_api::setGroupCallParticipantVolumeLevel &to, JsonObject &from); -Status from_json(td_api::setGroupCallTitle &to, JsonObject &from); - Status from_json(td_api::setInactiveSessionTtl &to, JsonObject &from); Status from_json(td_api::setInlineGameScore &to, JsonObject &from); @@ -3038,6 +3092,8 @@ Status from_json(td_api::setUsername &to, JsonObject &from); Status from_json(td_api::setVideoChatDefaultParticipant &to, JsonObject &from); +Status from_json(td_api::setVideoChatTitle &to, JsonObject &from); + Status from_json(td_api::shareChatWithBot &to, JsonObject &from); Status from_json(td_api::sharePhoneNumber &to, JsonObject &from); @@ -3048,7 +3104,7 @@ Status from_json(td_api::startGroupCallRecording &to, JsonObject &from); Status from_json(td_api::startGroupCallScreenSharing &to, JsonObject &from); -Status from_json(td_api::startScheduledGroupCall &to, JsonObject &from); +Status from_json(td_api::startScheduledVideoChat &to, JsonObject &from); Status from_json(td_api::stopBusinessPoll &to, JsonObject &from); @@ -3124,14 +3180,10 @@ Status from_json(td_api::toggleGeneralForumTopicIsHidden &to, JsonObject &from); Status from_json(td_api::toggleGiftIsSaved &to, JsonObject &from); -Status from_json(td_api::toggleGroupCallEnabledStartNotification &to, JsonObject &from); - Status from_json(td_api::toggleGroupCallIsMyVideoEnabled &to, JsonObject &from); Status from_json(td_api::toggleGroupCallIsMyVideoPaused &to, JsonObject &from); -Status from_json(td_api::toggleGroupCallMuteNewParticipants &to, JsonObject &from); - Status from_json(td_api::toggleGroupCallParticipantIsHandRaised &to, JsonObject &from); Status from_json(td_api::toggleGroupCallParticipantIsMuted &to, JsonObject &from); @@ -3152,6 +3204,8 @@ Status from_json(td_api::toggleSupergroupCanHaveSponsoredMessages &to, JsonObjec Status from_json(td_api::toggleSupergroupHasAggressiveAntiSpamEnabled &to, JsonObject &from); +Status from_json(td_api::toggleSupergroupHasAutomaticTranslation &to, JsonObject &from); + Status from_json(td_api::toggleSupergroupHasHiddenMembers &to, JsonObject &from); Status from_json(td_api::toggleSupergroupIsAllHistoryAvailable &to, JsonObject &from); @@ -3170,6 +3224,10 @@ Status from_json(td_api::toggleSupergroupUsernameIsActive &to, JsonObject &from) Status from_json(td_api::toggleUsernameIsActive &to, JsonObject &from); +Status from_json(td_api::toggleVideoChatEnabledStartNotification &to, JsonObject &from); + +Status from_json(td_api::toggleVideoChatMuteNewParticipants &to, JsonObject &from); + Status from_json(td_api::transferBusinessAccountStars &to, JsonObject &from); Status from_json(td_api::transferChatOwnership &to, JsonObject &from); @@ -3312,6 +3370,10 @@ void to_json(JsonValueScope &jv, const td_api::autosaveSettingsScopeChannelChats void to_json(JsonValueScope &jv, const td_api::autosaveSettingsScopeChat &object); +void to_json(JsonValueScope &jv, const td_api::availableGift &object); + +void to_json(JsonValueScope &jv, const td_api::availableGifts &object); + void to_json(JsonValueScope &jv, const td_api::availableReaction &object); void to_json(JsonValueScope &jv, const td_api::availableReactions &object); @@ -3466,7 +3528,7 @@ void to_json(JsonValueScope &jv, const td_api::callDiscardReasonDisconnected &ob void to_json(JsonValueScope &jv, const td_api::callDiscardReasonHungUp &object); -void to_json(JsonValueScope &jv, const td_api::callDiscardReasonAllowGroupCall &object); +void to_json(JsonValueScope &jv, const td_api::callDiscardReasonUpgradeToGroupCall &object); void to_json(JsonValueScope &jv, const td_api::callId &object); @@ -3504,6 +3566,20 @@ void to_json(JsonValueScope &jv, const td_api::callbackQueryPayloadDataWithPassw void to_json(JsonValueScope &jv, const td_api::callbackQueryPayloadGame &object); +void to_json(JsonValueScope &jv, const td_api::CanPostStoryResult &object); + +void to_json(JsonValueScope &jv, const td_api::canPostStoryResultOk &object); + +void to_json(JsonValueScope &jv, const td_api::canPostStoryResultPremiumNeeded &object); + +void to_json(JsonValueScope &jv, const td_api::canPostStoryResultBoostNeeded &object); + +void to_json(JsonValueScope &jv, const td_api::canPostStoryResultActiveStoryLimitExceeded &object); + +void to_json(JsonValueScope &jv, const td_api::canPostStoryResultWeeklyLimitExceeded &object); + +void to_json(JsonValueScope &jv, const td_api::canPostStoryResultMonthlyLimitExceeded &object); + void to_json(JsonValueScope &jv, const td_api::CanSendMessageToUserResult &object); void to_json(JsonValueScope &jv, const td_api::canSendMessageToUserResultOk &object); @@ -3514,20 +3590,6 @@ void to_json(JsonValueScope &jv, const td_api::canSendMessageToUserResultUserIsD void to_json(JsonValueScope &jv, const td_api::canSendMessageToUserResultUserRestrictsNewChats &object); -void to_json(JsonValueScope &jv, const td_api::CanSendStoryResult &object); - -void to_json(JsonValueScope &jv, const td_api::canSendStoryResultOk &object); - -void to_json(JsonValueScope &jv, const td_api::canSendStoryResultPremiumNeeded &object); - -void to_json(JsonValueScope &jv, const td_api::canSendStoryResultBoostNeeded &object); - -void to_json(JsonValueScope &jv, const td_api::canSendStoryResultActiveStoryLimitExceeded &object); - -void to_json(JsonValueScope &jv, const td_api::canSendStoryResultWeeklyLimitExceeded &object); - -void to_json(JsonValueScope &jv, const td_api::canSendStoryResultMonthlyLimitExceeded &object); - void to_json(JsonValueScope &jv, const td_api::CanTransferOwnershipResult &object); void to_json(JsonValueScope &jv, const td_api::canTransferOwnershipResultOk &object); @@ -3702,6 +3764,8 @@ void to_json(JsonValueScope &jv, const td_api::chatEventSignMessagesToggled &obj void to_json(JsonValueScope &jv, const td_api::chatEventShowMessageSenderToggled &object); +void to_json(JsonValueScope &jv, const td_api::chatEventAutomaticTranslationToggled &object); + void to_json(JsonValueScope &jv, const td_api::chatEventInviteLinkEdited &object); void to_json(JsonValueScope &jv, const td_api::chatEventInviteLinkRevoked &object); @@ -3942,6 +4006,8 @@ void to_json(JsonValueScope &jv, const td_api::currentWeather &object); void to_json(JsonValueScope &jv, const td_api::customRequestResult &object); +void to_json(JsonValueScope &jv, const td_api::data &object); + void to_json(JsonValueScope &jv, const td_api::databaseStatistics &object); void to_json(JsonValueScope &jv, const td_api::date &object); @@ -4020,8 +4086,6 @@ void to_json(JsonValueScope &jv, const td_api::fileDownload &object); void to_json(JsonValueScope &jv, const td_api::fileDownloadedPrefixSize &object); -void to_json(JsonValueScope &jv, const td_api::filePart &object); - void to_json(JsonValueScope &jv, const td_api::FileType &object); void to_json(JsonValueScope &jv, const td_api::fileTypeNone &object); @@ -4118,11 +4182,13 @@ void to_json(JsonValueScope &jv, const td_api::gameHighScores &object); void to_json(JsonValueScope &jv, const td_api::gift &object); +void to_json(JsonValueScope &jv, const td_api::giftForResale &object); + void to_json(JsonValueScope &jv, const td_api::giftSettings &object); void to_json(JsonValueScope &jv, const td_api::giftUpgradePreview &object); -void to_json(JsonValueScope &jv, const td_api::gifts &object); +void to_json(JsonValueScope &jv, const td_api::giftsForResale &object); void to_json(JsonValueScope &jv, const td_api::GiveawayInfo &object); @@ -4154,16 +4220,16 @@ void to_json(JsonValueScope &jv, const td_api::groupCall &object); void to_json(JsonValueScope &jv, const td_api::groupCallId &object); +void to_json(JsonValueScope &jv, const td_api::groupCallInfo &object); + void to_json(JsonValueScope &jv, const td_api::groupCallParticipant &object); void to_json(JsonValueScope &jv, const td_api::groupCallParticipantVideoInfo &object); +void to_json(JsonValueScope &jv, const td_api::groupCallParticipants &object); + void to_json(JsonValueScope &jv, const td_api::groupCallRecentSpeaker &object); -void to_json(JsonValueScope &jv, const td_api::groupCallStream &object); - -void to_json(JsonValueScope &jv, const td_api::groupCallStreams &object); - void to_json(JsonValueScope &jv, const td_api::groupCallVideoSourceGroup &object); void to_json(JsonValueScope &jv, const td_api::hashtags &object); @@ -4342,6 +4408,8 @@ void to_json(JsonValueScope &jv, const td_api::internalLinkTypeEditProfileSettin void to_json(JsonValueScope &jv, const td_api::internalLinkTypeGame &object); +void to_json(JsonValueScope &jv, const td_api::internalLinkTypeGroupCall &object); + void to_json(JsonValueScope &jv, const td_api::internalLinkTypeInstantView &object); void to_json(JsonValueScope &jv, const td_api::internalLinkTypeInvoice &object); @@ -4356,6 +4424,8 @@ void to_json(JsonValueScope &jv, const td_api::internalLinkTypeMessage &object); void to_json(JsonValueScope &jv, const td_api::internalLinkTypeMessageDraft &object); +void to_json(JsonValueScope &jv, const td_api::internalLinkTypeMyStars &object); + void to_json(JsonValueScope &jv, const td_api::internalLinkTypePassportDataRequest &object); void to_json(JsonValueScope &jv, const td_api::internalLinkTypePhoneNumberConfirmation &object); @@ -4400,6 +4470,16 @@ void to_json(JsonValueScope &jv, const td_api::internalLinkTypeVideoChat &object void to_json(JsonValueScope &jv, const td_api::internalLinkTypeWebApp &object); +void to_json(JsonValueScope &jv, const td_api::InviteGroupCallParticipantResult &object); + +void to_json(JsonValueScope &jv, const td_api::inviteGroupCallParticipantResultUserPrivacyRestricted &object); + +void to_json(JsonValueScope &jv, const td_api::inviteGroupCallParticipantResultUserAlreadyParticipant &object); + +void to_json(JsonValueScope &jv, const td_api::inviteGroupCallParticipantResultUserWasBanned &object); + +void to_json(JsonValueScope &jv, const td_api::inviteGroupCallParticipantResultSuccess &object); + void to_json(JsonValueScope &jv, const td_api::InviteLinkChatType &object); void to_json(JsonValueScope &jv, const td_api::inviteLinkChatTypeBasicGroup &object); @@ -4500,6 +4580,8 @@ void to_json(JsonValueScope &jv, const td_api::linkPreviewTypeExternalAudio &obj void to_json(JsonValueScope &jv, const td_api::linkPreviewTypeExternalVideo &object); +void to_json(JsonValueScope &jv, const td_api::linkPreviewTypeGroupCall &object); + void to_json(JsonValueScope &jv, const td_api::linkPreviewTypeInvoice &object); void to_json(JsonValueScope &jv, const td_api::linkPreviewTypeMessage &object); @@ -4634,6 +4716,8 @@ void to_json(JsonValueScope &jv, const td_api::messageInvoice &object); void to_json(JsonValueScope &jv, const td_api::messageCall &object); +void to_json(JsonValueScope &jv, const td_api::messageGroupCall &object); + void to_json(JsonValueScope &jv, const td_api::messageVideoChatScheduled &object); void to_json(JsonValueScope &jv, const td_api::messageVideoChatStarted &object); @@ -5268,9 +5352,9 @@ void to_json(JsonValueScope &jv, const td_api::premiumLimitTypeShareableChatFold void to_json(JsonValueScope &jv, const td_api::premiumLimitTypeActiveStoryCount &object); -void to_json(JsonValueScope &jv, const td_api::premiumLimitTypeWeeklySentStoryCount &object); +void to_json(JsonValueScope &jv, const td_api::premiumLimitTypeWeeklyPostedStoryCount &object); -void to_json(JsonValueScope &jv, const td_api::premiumLimitTypeMonthlySentStoryCount &object); +void to_json(JsonValueScope &jv, const td_api::premiumLimitTypeMonthlyPostedStoryCount &object); void to_json(JsonValueScope &jv, const td_api::premiumLimitTypeStoryCaptionLength &object); @@ -5726,6 +5810,10 @@ void to_json(JsonValueScope &jv, const td_api::starTransactionTypeGiftSale &obje void to_json(JsonValueScope &jv, const td_api::starTransactionTypeGiftUpgrade &object); +void to_json(JsonValueScope &jv, const td_api::starTransactionTypeUpgradedGiftPurchase &object); + +void to_json(JsonValueScope &jv, const td_api::starTransactionTypeUpgradedGiftSale &object); + void to_json(JsonValueScope &jv, const td_api::starTransactionTypeChannelPaidReactionSend &object); void to_json(JsonValueScope &jv, const td_api::starTransactionTypeChannelPaidReactionReceive &object); @@ -5904,6 +5992,8 @@ void to_json(JsonValueScope &jv, const td_api::suggestedActionExtendPremium &obj void to_json(JsonValueScope &jv, const td_api::suggestedActionExtendStarSubscriptions &object); +void to_json(JsonValueScope &jv, const td_api::suggestedActionCustom &object); + void to_json(JsonValueScope &jv, const td_api::supergroup &object); void to_json(JsonValueScope &jv, const td_api::supergroupFullInfo &object); @@ -6210,6 +6300,10 @@ void to_json(JsonValueScope &jv, const td_api::updateGroupCall &object); void to_json(JsonValueScope &jv, const td_api::updateGroupCallParticipant &object); +void to_json(JsonValueScope &jv, const td_api::updateGroupCallParticipants &object); + +void to_json(JsonValueScope &jv, const td_api::updateGroupCallVerificationState &object); + void to_json(JsonValueScope &jv, const td_api::updateNewCallSignalingData &object); void to_json(JsonValueScope &jv, const td_api::updateUserPrivacySettingRules &object); @@ -6222,9 +6316,9 @@ void to_json(JsonValueScope &jv, const td_api::updateStory &object); void to_json(JsonValueScope &jv, const td_api::updateStoryDeleted &object); -void to_json(JsonValueScope &jv, const td_api::updateStorySendSucceeded &object); +void to_json(JsonValueScope &jv, const td_api::updateStoryPostSucceeded &object); -void to_json(JsonValueScope &jv, const td_api::updateStorySendFailed &object); +void to_json(JsonValueScope &jv, const td_api::updateStoryPostFailed &object); void to_json(JsonValueScope &jv, const td_api::updateChatActiveStories &object); @@ -6356,12 +6450,18 @@ void to_json(JsonValueScope &jv, const td_api::upgradedGiftBackdrop &object); void to_json(JsonValueScope &jv, const td_api::upgradedGiftBackdropColors &object); +void to_json(JsonValueScope &jv, const td_api::upgradedGiftBackdropCount &object); + void to_json(JsonValueScope &jv, const td_api::upgradedGiftModel &object); +void to_json(JsonValueScope &jv, const td_api::upgradedGiftModelCount &object); + void to_json(JsonValueScope &jv, const td_api::upgradedGiftOriginalDetails &object); void to_json(JsonValueScope &jv, const td_api::upgradedGiftSymbol &object); +void to_json(JsonValueScope &jv, const td_api::upgradedGiftSymbolCount &object); + void to_json(JsonValueScope &jv, const td_api::user &object); void to_json(JsonValueScope &jv, const td_api::userFullInfo &object); @@ -6468,6 +6568,10 @@ void to_json(JsonValueScope &jv, const td_api::video &object); void to_json(JsonValueScope &jv, const td_api::videoChat &object); +void to_json(JsonValueScope &jv, const td_api::videoChatStream &object); + +void to_json(JsonValueScope &jv, const td_api::videoChatStreams &object); + void to_json(JsonValueScope &jv, const td_api::videoNote &object); void to_json(JsonValueScope &jv, const td_api::voiceNote &object); diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/generate/auto/td/telegram/telegram_api.h b/third-party/td/TdBinding/SharedHeaders/td/td/generate/auto/td/telegram/telegram_api.h index c35feeffb3..ff9514f8c7 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/generate/auto/td/telegram/telegram_api.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/generate/auto/td/telegram/telegram_api.h @@ -3,6 +3,7 @@ #include "td/tl/TlObject.h" #include "td/utils/buffer.h" +#include "td/utils/UInt.h" #include #include @@ -388,7 +389,6 @@ class autoDownloadSettings final : public Object { int32 video_upload_maxbitrate_; int32 small_queue_active_operations_max_; int32 large_queue_active_operations_max_; - enum Flags : std::int32_t { DISABLED_MASK = 1, VIDEO_PRELOAD_LARGE_MASK = 2, AUDIO_PRELOAD_NEXT_MASK = 4, PHONECALLS_LESS_DATA_MASK = 8, STORIES_PRELOAD_MASK = 16 }; autoDownloadSettings(); @@ -437,7 +437,7 @@ class autoSaveSettings final : public Object { bool photos_; bool videos_; int64 video_max_size_; - enum Flags : std::int32_t { PHOTOS_MASK = 1, VIDEOS_MASK = 2, VIDEO_MAX_SIZE_MASK = 4 }; + enum Flags : std::int32_t { VIDEO_MAX_SIZE_MASK = 4 }; autoSaveSettings(); @@ -1564,7 +1564,6 @@ class businessBotRights final : public Object { bool transfer_and_upgrade_gifts_; bool transfer_stars_; bool manage_stories_; - enum Flags : std::int32_t { REPLY_MASK = 1, READ_MESSAGES_MASK = 2, DELETE_SENT_MESSAGES_MASK = 4, DELETE_RECEIVED_MESSAGES_MASK = 8, EDIT_NAME_MASK = 16, EDIT_BIO_MASK = 32, EDIT_PROFILE_PHOTO_MASK = 64, EDIT_USERNAME_MASK = 128, VIEW_GIFTS_MASK = 256, SELL_GIFTS_MASK = 512, CHANGE_GIFT_SETTINGS_MASK = 1024, TRANSFER_AND_UPGRADE_GIFTS_MASK = 2048, TRANSFER_STARS_MASK = 4096, MANAGE_STORIES_MASK = 8192 }; businessBotRights(); @@ -1729,7 +1728,6 @@ class businessWorkHours final : public Object { bool open_now_; string timezone_id_; array> weekly_open_; - enum Flags : std::int32_t { OPEN_NOW_MASK = 1 }; businessWorkHours(); @@ -1817,6 +1815,8 @@ class ExportedChatInvite; class ForumTopic; +class InputGroupCall; + class InputStickerSet; class Message; @@ -1829,8 +1829,6 @@ class chatBannedRights; class groupCallParticipant; -class inputGroupCall; - class peerColor; class ChannelAdminLogEventAction: public Object { @@ -2208,7 +2206,7 @@ class channelAdminLogEventActionStartGroupCall final : public ChannelAdminLogEve } public: - object_ptr call_; + object_ptr call_; static const std::int32_t ID = 589338437; @@ -2225,7 +2223,7 @@ class channelAdminLogEventActionDiscardGroupCall final : public ChannelAdminLogE } public: - object_ptr call_; + object_ptr call_; static const std::int32_t ID = -610299584; @@ -2711,6 +2709,23 @@ class channelAdminLogEventActionParticipantSubExtend final : public ChannelAdmin void store(TlStorerToString &s, const char *field_name) const final; }; +class channelAdminLogEventActionToggleAutotranslation final : public ChannelAdminLogEventAction { + std::int32_t get_id() const final { + return ID; + } + + public: + bool new_value_; + + static const std::int32_t ID = -988285058; + + static object_ptr fetch(TlBufferParser &p); + + explicit channelAdminLogEventActionToggleAutotranslation(TlBufferParser &p); + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class channelAdminLogEventsFilter final : public Object { std::int32_t get_id() const final { return ID; @@ -2737,7 +2752,6 @@ class channelAdminLogEventsFilter final : public Object { bool send_; bool forums_; bool sub_extend_; - enum Flags : std::int32_t { JOIN_MASK = 1, LEAVE_MASK = 2, INVITE_MASK = 4, BAN_MASK = 8, UNBAN_MASK = 16, KICK_MASK = 32, UNKICK_MASK = 64, PROMOTE_MASK = 128, DEMOTE_MASK = 256, INFO_MASK = 512, SETTINGS_MASK = 1024, PINNED_MASK = 2048, EDIT_MASK = 4096, DELETE_MASK = 8192, GROUP_CALL_MASK = 16384, INVITES_MASK = 32768, SEND_MASK = 65536, FORUMS_MASK = 131072, SUB_EXTEND_MASK = 262144 }; channelAdminLogEventsFilter(int32 flags_, bool join_, bool leave_, bool invite_, bool ban_, bool unban_, bool kick_, bool unkick_, bool promote_, bool demote_, bool info_, bool settings_, bool pinned_, bool edit_, bool delete_, bool group_call_, bool invites_, bool send_, bool forums_, bool sub_extend_); @@ -2821,7 +2835,6 @@ class channelMessagesFilter final : public ChannelMessagesFilter { int32 flags_; bool exclude_new_messages_; array> ranges_; - enum Flags : std::int32_t { EXCLUDE_NEW_MESSAGES_MASK = 2 }; channelMessagesFilter(int32 flags_, bool exclude_new_messages_, array> &&ranges_); @@ -3247,6 +3260,7 @@ class channel final : public Chat { bool stories_hidden_min_; bool stories_unavailable_; bool signature_profiles_; + bool autotranslation_; int64 id_; int64 access_hash_; string title_; @@ -3326,7 +3340,6 @@ class chatAdminRights final : public Object { bool post_stories_; bool edit_stories_; bool delete_stories_; - enum Flags : std::int32_t { CHANGE_INFO_MASK = 1, POST_MESSAGES_MASK = 2, EDIT_MESSAGES_MASK = 4, DELETE_MESSAGES_MASK = 8, BAN_USERS_MASK = 16, INVITE_USERS_MASK = 32, PIN_MESSAGES_MASK = 128, ADD_ADMINS_MASK = 512, ANONYMOUS_MASK = 1024, MANAGE_CALL_MASK = 2048, OTHER_MASK = 4096, MANAGE_TOPICS_MASK = 8192, POST_STORIES_MASK = 16384, EDIT_STORIES_MASK = 32768, DELETE_STORIES_MASK = 65536 }; chatAdminRights(); @@ -3390,7 +3403,6 @@ class chatBannedRights final : public Object { bool send_docs_; bool send_plain_; int32 until_date_; - enum Flags : std::int32_t { VIEW_MESSAGES_MASK = 1, SEND_MESSAGES_MASK = 2, SEND_MEDIA_MASK = 4, SEND_STICKERS_MASK = 8, SEND_GIFS_MASK = 16, SEND_GAMES_MASK = 32, SEND_INLINE_MASK = 64, EMBED_LINKS_MASK = 128, SEND_POLLS_MASK = 256, CHANGE_INFO_MASK = 1024, INVITE_USERS_MASK = 32768, PIN_MESSAGES_MASK = 131072, MANAGE_TOPICS_MASK = 262144, SEND_PHOTOS_MASK = 524288, SEND_VIDEOS_MASK = 1048576, SEND_ROUNDVIDEOS_MASK = 2097152, SEND_AUDIOS_MASK = 4194304, SEND_VOICES_MASK = 8388608, SEND_DOCS_MASK = 16777216, SEND_PLAIN_MASK = 33554432 }; chatBannedRights(); @@ -3415,6 +3427,8 @@ class ChatReactions; class ExportedChatInvite; +class InputGroupCall; + class Peer; class Photo; @@ -3425,8 +3439,6 @@ class botInfo; class botVerification; -class inputGroupCall; - class peerNotifySettings; class peerStories; @@ -3458,7 +3470,7 @@ class chatFull final : public ChatFull { array> bot_info_; int32 pinned_msg_id_; int32 folder_id_; - object_ptr call_; + object_ptr call_; int32 ttl_period_; object_ptr groupcall_default_join_as_; string theme_emoticon_; @@ -3532,7 +3544,7 @@ class channelFull final : public ChatFull { int32 slowmode_next_send_date_; int32 stats_dc_; int32 pts_; - object_ptr call_; + object_ptr call_; int32 ttl_period_; array pending_suggestions_; object_ptr groupcall_default_join_as_; @@ -3871,7 +3883,6 @@ class chatReactionsAll final : public ChatReactions { public: int32 flags_; bool allow_custom_; - enum Flags : std::int32_t { ALLOW_CUSTOM_MASK = 1 }; chatReactionsAll(); @@ -3927,7 +3938,7 @@ class codeSettings final : public Object { array logout_tokens_; string token_; bool app_sandbox_; - enum Flags : std::int32_t { ALLOW_FLASHCALL_MASK = 1, CURRENT_NUMBER_MASK = 2, ALLOW_APP_HASH_MASK = 16, ALLOW_MISSED_CALL_MASK = 32, ALLOW_FIREBASE_MASK = 128, UNKNOWN_NUMBER_MASK = 512, LOGOUT_TOKENS_MASK = 64, TOKEN_MASK = 256, APP_SANDBOX_MASK = 256 }; + enum Flags : std::int32_t { LOGOUT_TOKENS_MASK = 64, TOKEN_MASK = 256, APP_SANDBOX_MASK = 256 }; codeSettings(int32 flags_, bool allow_flashcall_, bool current_number_, bool allow_app_hash_, bool allow_missed_call_, bool allow_firebase_, bool unknown_number_, array &&logout_tokens_, string const &token_, bool app_sandbox_); @@ -4290,7 +4301,7 @@ class dialogFilter final : public DialogFilter { array> pinned_peers_; array> include_peers_; array> exclude_peers_; - enum Flags : std::int32_t { CONTACTS_MASK = 1, NON_CONTACTS_MASK = 2, GROUPS_MASK = 4, BROADCASTS_MASK = 8, BOTS_MASK = 16, EXCLUDE_MUTED_MASK = 2048, EXCLUDE_READ_MASK = 4096, EXCLUDE_ARCHIVED_MASK = 8192, TITLE_NOANIMATE_MASK = 268435456, EMOTICON_MASK = 33554432, COLOR_MASK = 134217728 }; + enum Flags : std::int32_t { EMOTICON_MASK = 33554432, COLOR_MASK = 134217728 }; dialogFilter(); @@ -4340,7 +4351,7 @@ class dialogFilterChatlist final : public DialogFilter { int32 color_; array> pinned_peers_; array> include_peers_; - enum Flags : std::int32_t { HAS_MY_INVITES_MASK = 67108864, TITLE_NOANIMATE_MASK = 268435456, EMOTICON_MASK = 33554432, COLOR_MASK = 134217728 }; + enum Flags : std::int32_t { EMOTICON_MASK = 33554432, COLOR_MASK = 134217728 }; dialogFilterChatlist(); @@ -4430,7 +4441,6 @@ class disallowedGiftsSettings final : public Object { bool disallow_limited_stargifts_; bool disallow_unique_stargifts_; bool disallow_premium_gifts_; - enum Flags : std::int32_t { DISALLOW_UNLIMITED_STARGIFTS_MASK = 1, DISALLOW_LIMITED_STARGIFTS_MASK = 2, DISALLOW_UNIQUE_STARGIFTS_MASK = 4, DISALLOW_PREMIUM_GIFTS_MASK = 8 }; disallowedGiftsSettings(); @@ -4568,7 +4578,7 @@ class documentAttributeSticker final : public DocumentAttribute { string alt_; object_ptr stickerset_; object_ptr mask_coords_; - enum Flags : std::int32_t { MASK_MASK = 2, MASK_COORDS_MASK = 1 }; + enum Flags : std::int32_t { MASK_COORDS_MASK = 1 }; documentAttributeSticker(); @@ -4601,7 +4611,7 @@ class documentAttributeVideo final : public DocumentAttribute { int32 preload_prefix_size_; double video_start_ts_; string video_codec_; - enum Flags : std::int32_t { ROUND_MESSAGE_MASK = 1, SUPPORTS_STREAMING_MASK = 2, NOSOUND_MASK = 8, PRELOAD_PREFIX_SIZE_MASK = 4, VIDEO_START_TS_MASK = 16, VIDEO_CODEC_MASK = 32 }; + enum Flags : std::int32_t { PRELOAD_PREFIX_SIZE_MASK = 4, VIDEO_START_TS_MASK = 16, VIDEO_CODEC_MASK = 32 }; documentAttributeVideo(); @@ -4630,7 +4640,7 @@ class documentAttributeAudio final : public DocumentAttribute { string title_; string performer_; bytes waveform_; - enum Flags : std::int32_t { VOICE_MASK = 1024, TITLE_MASK = 1, PERFORMER_MASK = 2, WAVEFORM_MASK = 4 }; + enum Flags : std::int32_t { TITLE_MASK = 1, PERFORMER_MASK = 2, WAVEFORM_MASK = 4 }; documentAttributeAudio(); @@ -4699,7 +4709,6 @@ class documentAttributeCustomEmoji final : public DocumentAttribute { bool text_color_; string alt_; object_ptr stickerset_; - enum Flags : std::int32_t { FREE_MASK = 1, TEXT_COLOR_MASK = 2 }; documentAttributeCustomEmoji(); @@ -5853,7 +5862,7 @@ class globalPrivacySettings final : public Object { bool display_gifts_button_; int64 noncontact_peers_paid_stars_; object_ptr disallowed_gifts_; - enum Flags : std::int32_t { ARCHIVE_AND_MUTE_NEW_NONCONTACT_PEERS_MASK = 1, KEEP_ARCHIVED_UNMUTED_MASK = 2, KEEP_ARCHIVED_FOLDERS_MASK = 4, HIDE_READ_MARKS_MASK = 8, NEW_NONCONTACT_PEERS_REQUIRE_PREMIUM_MASK = 16, DISPLAY_GIFTS_BUTTON_MASK = 128, NONCONTACT_PEERS_PAID_STARS_MASK = 32, DISALLOWED_GIFTS_MASK = 64 }; + enum Flags : std::int32_t { NONCONTACT_PEERS_PAID_STARS_MASK = 32, DISALLOWED_GIFTS_MASK = 64 }; globalPrivacySettings(); @@ -5910,6 +5919,8 @@ class groupCall final : public GroupCall { bool record_video_active_; bool rtmp_stream_; bool listeners_hidden_; + bool conference_; + bool creator_; int64 id_; int64 access_hash_; int32 participants_count_; @@ -5920,12 +5931,12 @@ class groupCall final : public GroupCall { int32 unmuted_video_count_; int32 unmuted_video_limit_; int32 version_; - int64 conference_from_call_; - enum Flags : std::int32_t { TITLE_MASK = 8, STREAM_DC_ID_MASK = 16, RECORD_START_DATE_MASK = 32, SCHEDULE_DATE_MASK = 128, UNMUTED_VIDEO_COUNT_MASK = 1024, CONFERENCE_FROM_CALL_MASK = 16384 }; + string invite_link_; + enum Flags : std::int32_t { TITLE_MASK = 8, STREAM_DC_ID_MASK = 16, RECORD_START_DATE_MASK = 32, SCHEDULE_DATE_MASK = 128, UNMUTED_VIDEO_COUNT_MASK = 1024, INVITE_LINK_MASK = 65536 }; groupCall(); - static const std::int32_t ID = -839330845; + static const std::int32_t ID = 1429932961; static object_ptr fetch(TlBufferParser &p); @@ -6334,7 +6345,7 @@ class inputBotInlineMessageMediaAuto final : public InputBotInlineMessage { string message_; array> entities_; object_ptr reply_markup_; - enum Flags : std::int32_t { INVERT_MEDIA_MASK = 8, ENTITIES_MASK = 2, REPLY_MARKUP_MASK = 4 }; + enum Flags : std::int32_t { ENTITIES_MASK = 2, REPLY_MARKUP_MASK = 4 }; inputBotInlineMessageMediaAuto(int32 flags_, bool invert_media_, string const &message_, array> &&entities_, object_ptr &&reply_markup_); @@ -6359,7 +6370,7 @@ class inputBotInlineMessageText final : public InputBotInlineMessage { string message_; array> entities_; object_ptr reply_markup_; - enum Flags : std::int32_t { NO_WEBPAGE_MASK = 1, INVERT_MEDIA_MASK = 8, ENTITIES_MASK = 2, REPLY_MARKUP_MASK = 4 }; + enum Flags : std::int32_t { ENTITIES_MASK = 2, REPLY_MARKUP_MASK = 4 }; inputBotInlineMessageText(int32 flags_, bool no_webpage_, bool invert_media_, string const &message_, array> &&entities_, object_ptr &&reply_markup_); @@ -6513,7 +6524,7 @@ class inputBotInlineMessageMediaWebPage final : public InputBotInlineMessage { array> entities_; string url_; object_ptr reply_markup_; - enum Flags : std::int32_t { INVERT_MEDIA_MASK = 8, FORCE_LARGE_MEDIA_MASK = 16, FORCE_SMALL_MEDIA_MASK = 32, OPTIONAL_MASK = 64, ENTITIES_MASK = 2, REPLY_MARKUP_MASK = 4 }; + enum Flags : std::int32_t { ENTITIES_MASK = 2, REPLY_MARKUP_MASK = 4 }; inputBotInlineMessageMediaWebPage(int32 flags_, bool invert_media_, bool force_large_media_, bool force_small_media_, bool optional_, string const &message_, array> &&entities_, string const &url_, object_ptr &&reply_markup_); @@ -6707,7 +6718,6 @@ class inputBusinessAwayMessage final : public Object { int32 shortcut_id_; object_ptr schedule_; object_ptr recipients_; - enum Flags : std::int32_t { OFFLINE_ONLY_MASK = 1 }; inputBusinessAwayMessage(int32 flags_, bool offline_only_, int32 shortcut_id_, object_ptr &&schedule_, object_ptr &&recipients_); @@ -6736,7 +6746,7 @@ class inputBusinessBotRecipients final : public Object { bool exclude_selected_; array> users_; array> exclude_users_; - enum Flags : std::int32_t { EXISTING_CHATS_MASK = 1, NEW_CHATS_MASK = 2, CONTACTS_MASK = 4, NON_CONTACTS_MASK = 8, EXCLUDE_SELECTED_MASK = 32, USERS_MASK = 16, EXCLUDE_USERS_MASK = 64 }; + enum Flags : std::int32_t { USERS_MASK = 16, EXCLUDE_USERS_MASK = 64 }; inputBusinessBotRecipients(int32 flags_, bool existing_chats_, bool new_chats_, bool contacts_, bool non_contacts_, bool exclude_selected_, array> &&users_, array> &&exclude_users_); @@ -6837,7 +6847,7 @@ class inputBusinessRecipients final : public Object { bool non_contacts_; bool exclude_selected_; array> users_; - enum Flags : std::int32_t { EXISTING_CHATS_MASK = 1, NEW_CHATS_MASK = 2, CONTACTS_MASK = 4, NON_CONTACTS_MASK = 8, EXCLUDE_SELECTED_MASK = 32, USERS_MASK = 16 }; + enum Flags : std::int32_t { USERS_MASK = 16 }; inputBusinessRecipients(int32 flags_, bool existing_chats_, bool new_chats_, bool contacts_, bool non_contacts_, bool exclude_selected_, array> &&users_); @@ -7410,12 +7420,12 @@ class inputFileStoryDocument final : public InputFile { void store(TlStorerToString &s, const char *field_name) const final; }; +class InputGroupCall; + class InputPeer; class InputStickerSet; -class inputGroupCall; - class InputFileLocation: public Object { public: }; @@ -7431,7 +7441,6 @@ class inputPeerPhotoFileLocationLegacy final : public InputFileLocation { object_ptr peer_; int64 volume_id_; int32 local_id_; - enum Flags : std::int32_t { BIG_MASK = 1 }; inputPeerPhotoFileLocationLegacy(int32 flags_, bool big_, object_ptr &&peer_, int64 volume_id_, int32 local_id_); @@ -7621,7 +7630,6 @@ class inputPeerPhotoFileLocation final : public InputFileLocation { bool big_; object_ptr peer_; int64 photo_id_; - enum Flags : std::int32_t { BIG_MASK = 1 }; inputPeerPhotoFileLocation(int32 flags_, bool big_, object_ptr &&peer_, int64 photo_id_); @@ -7661,14 +7669,14 @@ class inputGroupCallStream final : public InputFileLocation { public: int32 flags_; - object_ptr call_; + object_ptr call_; int64 time_ms_; int32 scale_; int32 video_channel_; int32 video_quality_; enum Flags : std::int32_t { VIDEO_CHANNEL_MASK = 1, VIDEO_QUALITY_MASK = 1 }; - inputGroupCallStream(int32 flags_, object_ptr &&call_, int64 time_ms_, int32 scale_, int32 video_channel_, int32 video_quality_); + inputGroupCallStream(int32 flags_, object_ptr &&call_, int64 time_ms_, int32 scale_, int32 video_channel_, int32 video_quality_); static const std::int32_t ID = 93890858; @@ -7808,7 +7816,13 @@ class inputGeoPoint final : public InputGeoPoint { void store(TlStorerToString &s, const char *field_name) const final; }; -class inputGroupCall final : public Object { +class InputGroupCall: public Object { + public: + + static object_ptr fetch(TlBufferParser &p); +}; + +class inputGroupCall final : public InputGroupCall { std::int32_t get_id() const final { return ID; } @@ -7821,7 +7835,7 @@ class inputGroupCall final : public Object { static const std::int32_t ID = -659913713; - static object_ptr fetch(TlBufferParser &p); + static object_ptr fetch(TlBufferParser &p); explicit inputGroupCall(TlBufferParser &p); @@ -7832,6 +7846,52 @@ class inputGroupCall final : public Object { void store(TlStorerToString &s, const char *field_name) const final; }; +class inputGroupCallSlug final : public InputGroupCall { + std::int32_t get_id() const final { + return ID; + } + + public: + string slug_; + + explicit inputGroupCallSlug(string const &slug_); + + static const std::int32_t ID = -33127873; + + static object_ptr fetch(TlBufferParser &p); + + explicit inputGroupCallSlug(TlBufferParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class inputGroupCallInviteMessage final : public InputGroupCall { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 msg_id_; + + explicit inputGroupCallInviteMessage(int32 msg_id_); + + static const std::int32_t ID = -1945083841; + + static object_ptr fetch(TlBufferParser &p); + + explicit inputGroupCallInviteMessage(TlBufferParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class InputPeer; class InputSavedStarGift; @@ -7957,7 +8017,7 @@ class inputInvoiceStarGift final : public InputInvoice { object_ptr peer_; int64 gift_id_; object_ptr message_; - enum Flags : std::int32_t { HIDE_NAME_MASK = 1, INCLUDE_UPGRADE_MASK = 4, MESSAGE_MASK = 2 }; + enum Flags : std::int32_t { MESSAGE_MASK = 2 }; inputInvoiceStarGift(int32 flags_, bool hide_name_, bool include_upgrade_, object_ptr &&peer_, int64 gift_id_, object_ptr &&message_); @@ -7979,7 +8039,6 @@ class inputInvoiceStarGiftUpgrade final : public InputInvoice { int32 flags_; bool keep_original_details_; object_ptr stargift_; - enum Flags : std::int32_t { KEEP_ORIGINAL_DETAILS_MASK = 1 }; inputInvoiceStarGiftUpgrade(int32 flags_, bool keep_original_details_, object_ptr &&stargift_); @@ -8055,6 +8114,26 @@ class inputInvoiceBusinessBotTransferStars final : public InputInvoice { void store(TlStorerToString &s, const char *field_name) const final; }; +class inputInvoiceStarGiftResale final : public InputInvoice { + std::int32_t get_id() const final { + return ID; + } + + public: + string slug_; + object_ptr to_id_; + + inputInvoiceStarGiftResale(string const &slug_, object_ptr &&to_id_); + + static const std::int32_t ID = 1674298252; + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class DocumentAttribute; class InputDocument; @@ -8116,7 +8195,7 @@ class inputMediaUploadedPhoto final : public InputMedia { object_ptr file_; array> stickers_; int32 ttl_seconds_; - enum Flags : std::int32_t { SPOILER_MASK = 4, STICKERS_MASK = 1, TTL_SECONDS_MASK = 2 }; + enum Flags : std::int32_t { STICKERS_MASK = 1, TTL_SECONDS_MASK = 2 }; inputMediaUploadedPhoto(); @@ -8143,7 +8222,7 @@ class inputMediaPhoto final : public InputMedia { bool spoiler_; object_ptr id_; int32 ttl_seconds_; - enum Flags : std::int32_t { SPOILER_MASK = 2, TTL_SECONDS_MASK = 1 }; + enum Flags : std::int32_t { TTL_SECONDS_MASK = 1 }; inputMediaPhoto(); @@ -8227,7 +8306,7 @@ class inputMediaUploadedDocument final : public InputMedia { object_ptr video_cover_; int32 video_timestamp_; int32 ttl_seconds_; - enum Flags : std::int32_t { NOSOUND_VIDEO_MASK = 8, FORCE_FILE_MASK = 16, SPOILER_MASK = 32, THUMB_MASK = 4, STICKERS_MASK = 1, VIDEO_COVER_MASK = 64, VIDEO_TIMESTAMP_MASK = 128, TTL_SECONDS_MASK = 2 }; + enum Flags : std::int32_t { THUMB_MASK = 4, STICKERS_MASK = 1, VIDEO_COVER_MASK = 64, VIDEO_TIMESTAMP_MASK = 128, TTL_SECONDS_MASK = 2 }; inputMediaUploadedDocument(); @@ -8257,7 +8336,7 @@ class inputMediaDocument final : public InputMedia { int32 video_timestamp_; int32 ttl_seconds_; string query_; - enum Flags : std::int32_t { SPOILER_MASK = 4, VIDEO_COVER_MASK = 8, VIDEO_TIMESTAMP_MASK = 16, TTL_SECONDS_MASK = 1, QUERY_MASK = 2 }; + enum Flags : std::int32_t { VIDEO_COVER_MASK = 8, VIDEO_TIMESTAMP_MASK = 16, TTL_SECONDS_MASK = 1, QUERY_MASK = 2 }; inputMediaDocument(); @@ -8312,7 +8391,7 @@ class inputMediaPhotoExternal final : public InputMedia { bool spoiler_; string url_; int32 ttl_seconds_; - enum Flags : std::int32_t { SPOILER_MASK = 2, TTL_SECONDS_MASK = 1 }; + enum Flags : std::int32_t { TTL_SECONDS_MASK = 1 }; inputMediaPhotoExternal(); @@ -8341,7 +8420,7 @@ class inputMediaDocumentExternal final : public InputMedia { int32 ttl_seconds_; object_ptr video_cover_; int32 video_timestamp_; - enum Flags : std::int32_t { SPOILER_MASK = 2, TTL_SECONDS_MASK = 1, VIDEO_COVER_MASK = 4, VIDEO_TIMESTAMP_MASK = 8 }; + enum Flags : std::int32_t { TTL_SECONDS_MASK = 1, VIDEO_COVER_MASK = 4, VIDEO_TIMESTAMP_MASK = 8 }; inputMediaDocumentExternal(); @@ -8426,7 +8505,7 @@ class inputMediaGeoLive final : public InputMedia { int32 heading_; int32 period_; int32 proximity_notification_radius_; - enum Flags : std::int32_t { STOPPED_MASK = 1, HEADING_MASK = 4, PERIOD_MASK = 2, PROXIMITY_NOTIFICATION_RADIUS_MASK = 8 }; + enum Flags : std::int32_t { HEADING_MASK = 4, PERIOD_MASK = 2, PROXIMITY_NOTIFICATION_RADIUS_MASK = 8 }; inputMediaGeoLive(); @@ -8529,7 +8608,6 @@ class inputMediaWebPage final : public InputMedia { bool force_small_media_; bool optional_; string url_; - enum Flags : std::int32_t { FORCE_LARGE_MEDIA_MASK = 1, FORCE_SMALL_MEDIA_MASK = 2, OPTIONAL_MASK = 4 }; inputMediaWebPage(); @@ -8779,7 +8857,6 @@ class inputPaymentCredentials final : public InputPaymentCredentials { int32 flags_; bool save_; object_ptr data_; - enum Flags : std::int32_t { SAVE_MASK = 1 }; inputPaymentCredentials(int32 flags_, bool save_, object_ptr &&data_); @@ -9666,6 +9743,25 @@ class inputSavedStarGiftChat final : public InputSavedStarGift { void store(TlStorerToString &s, const char *field_name) const final; }; +class inputSavedStarGiftSlug final : public InputSavedStarGift { + std::int32_t get_id() const final { + return ID; + } + + public: + string slug_; + + explicit inputSavedStarGiftSlug(string const &slug_); + + static const std::int32_t ID = 545636920; + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class InputSecureFile: public Object { public: }; @@ -9786,7 +9882,6 @@ class inputStarsTransaction final : public Object { int32 flags_; bool refund_; string id_; - enum Flags : std::int32_t { REFUND_MASK = 1 }; inputStarsTransaction(int32 flags_, bool refund_, string const &id_); @@ -10112,7 +10207,6 @@ class inputStorePaymentPremiumSubscription final : public InputStorePaymentPurpo int32 flags_; bool restore_; bool upgrade_; - enum Flags : std::int32_t { RESTORE_MASK = 1, UPGRADE_MASK = 2 }; inputStorePaymentPremiumSubscription(int32 flags_, bool restore_, bool upgrade_); @@ -10188,7 +10282,7 @@ class inputStorePaymentPremiumGiveaway final : public InputStorePaymentPurpose { int32 until_date_; string currency_; int64 amount_; - enum Flags : std::int32_t { ONLY_NEW_SUBSCRIBERS_MASK = 1, WINNERS_ARE_VISIBLE_MASK = 8, ADDITIONAL_PEERS_MASK = 2, COUNTRIES_ISO2_MASK = 4, PRIZE_DESCRIPTION_MASK = 16 }; + enum Flags : std::int32_t { ADDITIONAL_PEERS_MASK = 2, COUNTRIES_ISO2_MASK = 4, PRIZE_DESCRIPTION_MASK = 16 }; inputStorePaymentPremiumGiveaway(int32 flags_, bool only_new_subscribers_, bool winners_are_visible_, object_ptr &&boost_peer_, array> &&additional_peers_, array &&countries_iso2_, string const &prize_description_, int64 random_id_, int32 until_date_, string const ¤cy_, int64 amount_); @@ -10263,7 +10357,7 @@ class inputStorePaymentStarsGiveaway final : public InputStorePaymentPurpose { string currency_; int64 amount_; int32 users_; - enum Flags : std::int32_t { ONLY_NEW_SUBSCRIBERS_MASK = 1, WINNERS_ARE_VISIBLE_MASK = 8, ADDITIONAL_PEERS_MASK = 2, COUNTRIES_ISO2_MASK = 4, PRIZE_DESCRIPTION_MASK = 16 }; + enum Flags : std::int32_t { ADDITIONAL_PEERS_MASK = 2, COUNTRIES_ISO2_MASK = 4, PRIZE_DESCRIPTION_MASK = 16 }; inputStorePaymentStarsGiveaway(int32 flags_, bool only_new_subscribers_, bool winners_are_visible_, int64 stars_, object_ptr &&boost_peer_, array> &&additional_peers_, array &&countries_iso2_, string const &prize_description_, int64 random_id_, int32 until_date_, string const ¤cy_, int64 amount_, int32 users_); @@ -10288,7 +10382,6 @@ class inputStorePaymentAuthCode final : public InputStorePaymentPurpose { string phone_code_hash_; string currency_; int64 amount_; - enum Flags : std::int32_t { RESTORE_MASK = 1 }; inputStorePaymentAuthCode(int32 flags_, bool restore_, string const &phone_number_, string const &phone_code_hash_, string const ¤cy_, int64 amount_); @@ -10364,7 +10457,7 @@ class inputThemeSettings final : public Object { array message_colors_; object_ptr wallpaper_; object_ptr wallpaper_settings_; - enum Flags : std::int32_t { MESSAGE_COLORS_ANIMATED_MASK = 4, OUTBOX_ACCENT_COLOR_MASK = 8, MESSAGE_COLORS_MASK = 1, WALLPAPER_MASK = 2, WALLPAPER_SETTINGS_MASK = 2 }; + enum Flags : std::int32_t { OUTBOX_ACCENT_COLOR_MASK = 8, MESSAGE_COLORS_MASK = 1, WALLPAPER_MASK = 2, WALLPAPER_SETTINGS_MASK = 2 }; inputThemeSettings(int32 flags_, bool message_colors_animated_, object_ptr &&base_theme_, int32 accent_color_, int32 outbox_accent_color_, array &&message_colors_, object_ptr &&wallpaper_, object_ptr &&wallpaper_settings_); @@ -10623,7 +10716,7 @@ class inputWebFileAudioAlbumThumbLocation final : public InputWebFileLocation { object_ptr document_; string title_; string performer_; - enum Flags : std::int32_t { SMALL_MASK = 4, DOCUMENT_MASK = 1, TITLE_MASK = 2, PERFORMER_MASK = 2 }; + enum Flags : std::int32_t { DOCUMENT_MASK = 1, TITLE_MASK = 2, PERFORMER_MASK = 2 }; inputWebFileAudioAlbumThumbLocation(int32 flags_, bool small_, object_ptr &&document_, string const &title_, string const &performer_); @@ -10660,7 +10753,7 @@ class invoice final : public Object { array suggested_tip_amounts_; string terms_url_; int32 subscription_period_; - enum Flags : std::int32_t { TEST_MASK = 1, NAME_REQUESTED_MASK = 2, PHONE_REQUESTED_MASK = 4, EMAIL_REQUESTED_MASK = 8, SHIPPING_ADDRESS_REQUESTED_MASK = 16, FLEXIBLE_MASK = 32, PHONE_TO_PROVIDER_MASK = 64, EMAIL_TO_PROVIDER_MASK = 128, RECURRING_MASK = 512, MAX_TIP_AMOUNT_MASK = 256, SUGGESTED_TIP_AMOUNTS_MASK = 256, TERMS_URL_MASK = 1024, SUBSCRIPTION_PERIOD_MASK = 2048 }; + enum Flags : std::int32_t { MAX_TIP_AMOUNT_MASK = 256, SUGGESTED_TIP_AMOUNTS_MASK = 256, TERMS_URL_MASK = 1024, SUBSCRIPTION_PERIOD_MASK = 2048 }; invoice(); @@ -10958,7 +11051,6 @@ class keyboardButtonCallback final : public KeyboardButton { bool requires_password_; string text_; bytes data_; - enum Flags : std::int32_t { REQUIRES_PASSWORD_MASK = 1 }; keyboardButtonCallback(); @@ -11032,7 +11124,7 @@ class keyboardButtonSwitchInline final : public KeyboardButton { string text_; string query_; array> peer_types_; - enum Flags : std::int32_t { SAME_PEER_MASK = 1, PEER_TYPES_MASK = 2 }; + enum Flags : std::int32_t { PEER_TYPES_MASK = 2 }; keyboardButtonSwitchInline(); @@ -11135,7 +11227,7 @@ class inputKeyboardButtonUrlAuth final : public KeyboardButton { string fwd_text_; string url_; object_ptr bot_; - enum Flags : std::int32_t { REQUEST_WRITE_ACCESS_MASK = 1, FWD_TEXT_MASK = 2 }; + enum Flags : std::int32_t { FWD_TEXT_MASK = 2 }; inputKeyboardButtonUrlAuth(); @@ -11314,7 +11406,6 @@ class inputKeyboardButtonRequestPeer final : public KeyboardButton { int32 button_id_; object_ptr peer_type_; int32 max_quantity_; - enum Flags : std::int32_t { NAME_REQUESTED_MASK = 1, USERNAME_REQUESTED_MASK = 2, PHOTO_REQUESTED_MASK = 4 }; inputKeyboardButtonRequestPeer(); @@ -11661,7 +11752,6 @@ class mediaAreaSuggestedReaction final : public MediaArea { bool flipped_; object_ptr coordinates_; object_ptr reaction_; - enum Flags : std::int32_t { DARK_MASK = 1, FLIPPED_MASK = 2 }; mediaAreaSuggestedReaction(); @@ -11976,6 +12066,8 @@ class messageService final : public Message { class BotApp; +class InputGroupCall; + class Peer; class PhoneCallDiscardReason; @@ -11990,8 +12082,6 @@ class StarGift; class WallPaper; -class inputGroupCall; - class paymentCharge; class paymentRequestedInfo; @@ -12438,7 +12528,7 @@ class messageActionGroupCall final : public MessageAction { public: int32 flags_; - object_ptr call_; + object_ptr call_; int32 duration_; enum Flags : std::int32_t { DURATION_MASK = 1 }; @@ -12457,7 +12547,7 @@ class messageActionInviteToGroupCall final : public MessageAction { } public: - object_ptr call_; + object_ptr call_; array users_; static const std::int32_t ID = 1345295095; @@ -12495,7 +12585,7 @@ class messageActionGroupCallScheduled final : public MessageAction { } public: - object_ptr call_; + object_ptr call_; int32 schedule_date_; static const std::int32_t ID = -1281329567; @@ -12915,11 +13005,14 @@ class messageActionStarGiftUnique final : public MessageAction { object_ptr from_id_; object_ptr peer_; int64 saved_id_; - enum Flags : std::int32_t { CAN_EXPORT_AT_MASK = 8, TRANSFER_STARS_MASK = 16, SAVED_ID_MASK = 128 }; + int64 resale_stars_; + int32 can_transfer_at_; + int32 can_resell_at_; + enum Flags : std::int32_t { CAN_EXPORT_AT_MASK = 8, TRANSFER_STARS_MASK = 16, SAVED_ID_MASK = 128, RESALE_STARS_MASK = 256, CAN_TRANSFER_AT_MASK = 512, CAN_RESELL_AT_MASK = 1024 }; messageActionStarGiftUnique(); - static const std::int32_t ID = -1394619519; + static const std::int32_t ID = 775611918; static object_ptr fetch(TlBufferParser &p); @@ -12961,6 +13054,30 @@ class messageActionPaidMessagesPrice final : public MessageAction { void store(TlStorerToString &s, const char *field_name) const final; }; +class messageActionConferenceCall final : public MessageAction { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 flags_; + bool missed_; + bool active_; + bool video_; + int64 call_id_; + int32 duration_; + array> other_participants_; + enum Flags : std::int32_t { DURATION_MASK = 4 }; + + messageActionConferenceCall(); + + static const std::int32_t ID = 805187450; + + static object_ptr fetch(TlBufferParser &p); + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class InputUser; class MessageEntity: public Object { @@ -13464,7 +13581,6 @@ class messageEntityBlockquote final : public MessageEntity { bool collapsed_; int32 offset_; int32 length_; - enum Flags : std::int32_t { COLLAPSED_MASK = 1 }; messageEntityBlockquote(); @@ -14440,7 +14556,6 @@ class inputMessagesFilterPhoneCalls final : public MessagesFilter { public: int32 flags_; bool missed_; - enum Flags : std::int32_t { MISSED_MASK = 1 }; inputMessagesFilterPhoneCalls(); @@ -16029,14 +16144,34 @@ class peerStories final : public Object { void store(TlStorerToString &s, const char *field_name) const final; }; +class textWithEntities; + +class pendingSuggestion final : public Object { + std::int32_t get_id() const final { + return ID; + } + + public: + string suggestion_; + object_ptr title_; + object_ptr description_; + string url_; + + static const std::int32_t ID = -404214254; + + static object_ptr fetch(TlBufferParser &p); + + explicit pendingSuggestion(TlBufferParser &p); + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class PhoneCallDiscardReason; class PhoneConnection; class dataJSON; -class inputGroupCall; - class phoneCallProtocol; class PhoneCall: public Object { @@ -16077,12 +16212,11 @@ class phoneCallWaiting final : public PhoneCall { int64 participant_id_; object_ptr protocol_; int32 receive_date_; - object_ptr conference_call_; enum Flags : std::int32_t { RECEIVE_DATE_MASK = 1 }; phoneCallWaiting(); - static const std::int32_t ID = -288085928; + static const std::int32_t ID = -987599081; static object_ptr fetch(TlBufferParser &p); @@ -16104,11 +16238,10 @@ class phoneCallRequested final : public PhoneCall { int64 participant_id_; bytes g_a_hash_; object_ptr protocol_; - object_ptr conference_call_; phoneCallRequested(); - static const std::int32_t ID = 1161174115; + static const std::int32_t ID = 347139340; static object_ptr fetch(TlBufferParser &p); @@ -16130,11 +16263,10 @@ class phoneCallAccepted final : public PhoneCall { int64 participant_id_; bytes g_b_; object_ptr protocol_; - object_ptr conference_call_; phoneCallAccepted(); - static const std::int32_t ID = 587035009; + static const std::int32_t ID = 912311057; static object_ptr fetch(TlBufferParser &p); @@ -16150,6 +16282,7 @@ class phoneCall final : public PhoneCall { int32 flags_; bool p2p_allowed_; bool video_; + bool conference_supported_; int64 id_; int64 access_hash_; int32 date_; @@ -16161,11 +16294,10 @@ class phoneCall final : public PhoneCall { array> connections_; int32 start_date_; object_ptr custom_parameters_; - object_ptr conference_call_; phoneCall(); - static const std::int32_t ID = 1000707084; + static const std::int32_t ID = 810769141; static object_ptr fetch(TlBufferParser &p); @@ -16185,12 +16317,11 @@ class phoneCallDiscarded final : public PhoneCall { int64 id_; object_ptr reason_; int32 duration_; - object_ptr conference_call_; enum Flags : std::int32_t { DURATION_MASK = 2 }; phoneCallDiscarded(); - static const std::int32_t ID = -103656189; + static const std::int32_t ID = 1355435489; static object_ptr fetch(TlBufferParser &p); @@ -16275,6 +16406,29 @@ class phoneCallDiscardReasonBusy final : public PhoneCallDiscardReason { void store(TlStorerToString &s, const char *field_name) const final; }; +class phoneCallDiscardReasonMigrateConferenceCall final : public PhoneCallDiscardReason { + std::int32_t get_id() const final { + return ID; + } + + public: + string slug_; + + explicit phoneCallDiscardReasonMigrateConferenceCall(string const &slug_); + + static const std::int32_t ID = -1615072777; + + static object_ptr fetch(TlBufferParser &p); + + explicit phoneCallDiscardReasonMigrateConferenceCall(TlBufferParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class phoneCallProtocol final : public Object { std::int32_t get_id() const final { return ID; @@ -16287,7 +16441,6 @@ class phoneCallProtocol final : public Object { int32 min_layer_; int32 max_layer_; array library_versions_; - enum Flags : std::int32_t { UDP_P2P_MASK = 1, UDP_REFLECTOR_MASK = 2 }; phoneCallProtocol(); @@ -16555,7 +16708,7 @@ class poll final : public Object { array> answers_; int32 close_period_; int32 close_date_; - enum Flags : std::int32_t { CLOSED_MASK = 1, PUBLIC_VOTERS_MASK = 2, MULTIPLE_CHOICE_MASK = 4, QUIZ_MASK = 8, CLOSE_PERIOD_MASK = 16, CLOSE_DATE_MASK = 32 }; + enum Flags : std::int32_t { CLOSE_PERIOD_MASK = 16, CLOSE_DATE_MASK = 32 }; poll(); @@ -17621,7 +17774,6 @@ class replyKeyboardHide final : public ReplyMarkup { public: int32 flags_; bool selective_; - enum Flags : std::int32_t { SELECTIVE_MASK = 4 }; replyKeyboardHide(); @@ -17648,7 +17800,7 @@ class replyKeyboardForceReply final : public ReplyMarkup { bool single_use_; bool selective_; string placeholder_; - enum Flags : std::int32_t { SINGLE_USE_MASK = 2, SELECTIVE_MASK = 4, PLACEHOLDER_MASK = 8 }; + enum Flags : std::int32_t { PLACEHOLDER_MASK = 8 }; replyKeyboardForceReply(); @@ -17678,7 +17830,7 @@ class replyKeyboardMarkup final : public ReplyMarkup { bool persistent_; array> rows_; string placeholder_; - enum Flags : std::int32_t { RESIZE_MASK = 1, SINGLE_USE_MASK = 2, SELECTIVE_MASK = 4, PERSISTENT_MASK = 16, PLACEHOLDER_MASK = 8 }; + enum Flags : std::int32_t { PLACEHOLDER_MASK = 8 }; replyKeyboardMarkup(); @@ -17988,7 +18140,7 @@ class requestPeerTypeChat final : public RequestPeerType { bool forum_; object_ptr user_admin_rights_; object_ptr bot_admin_rights_; - enum Flags : std::int32_t { CREATOR_MASK = 1, BOT_PARTICIPANT_MASK = 32, HAS_USERNAME_MASK = 8, FORUM_MASK = 16, USER_ADMIN_RIGHTS_MASK = 2, BOT_ADMIN_RIGHTS_MASK = 4 }; + enum Flags : std::int32_t { HAS_USERNAME_MASK = 8, FORUM_MASK = 16, USER_ADMIN_RIGHTS_MASK = 2, BOT_ADMIN_RIGHTS_MASK = 4 }; requestPeerTypeChat(); @@ -18016,7 +18168,7 @@ class requestPeerTypeBroadcast final : public RequestPeerType { bool has_username_; object_ptr user_admin_rights_; object_ptr bot_admin_rights_; - enum Flags : std::int32_t { CREATOR_MASK = 1, HAS_USERNAME_MASK = 8, USER_ADMIN_RIGHTS_MASK = 2, BOT_ADMIN_RIGHTS_MASK = 4 }; + enum Flags : std::int32_t { HAS_USERNAME_MASK = 8, USER_ADMIN_RIGHTS_MASK = 2, BOT_ADMIN_RIGHTS_MASK = 4 }; requestPeerTypeBroadcast(); @@ -18554,11 +18706,13 @@ class savedStarGift final : public Object { int64 upgrade_stars_; int32 can_export_at_; int64 transfer_stars_; - enum Flags : std::int32_t { MSG_ID_MASK = 8, SAVED_ID_MASK = 2048, CONVERT_STARS_MASK = 16, UPGRADE_STARS_MASK = 64, CAN_EXPORT_AT_MASK = 128, TRANSFER_STARS_MASK = 256 }; + int32 can_transfer_at_; + int32 can_resell_at_; + enum Flags : std::int32_t { MSG_ID_MASK = 8, SAVED_ID_MASK = 2048, CONVERT_STARS_MASK = 16, UPGRADE_STARS_MASK = 64, CAN_EXPORT_AT_MASK = 128, TRANSFER_STARS_MASK = 256, CAN_TRANSFER_AT_MASK = 8192, CAN_RESELL_AT_MASK = 16384 }; savedStarGift(); - static const std::int32_t ID = 1616305061; + static const std::int32_t ID = -539360103; static object_ptr fetch(TlBufferParser &p); @@ -19973,15 +20127,18 @@ class starGift final : public StarGift { int64 stars_; int32 availability_remains_; int32 availability_total_; + int64 availability_resale_; int64 convert_stars_; int32 first_sale_date_; int32 last_sale_date_; int64 upgrade_stars_; - enum Flags : std::int32_t { AVAILABILITY_REMAINS_MASK = 1, AVAILABILITY_TOTAL_MASK = 1, FIRST_SALE_DATE_MASK = 2, LAST_SALE_DATE_MASK = 2, UPGRADE_STARS_MASK = 8 }; + int64 resell_min_stars_; + string title_; + enum Flags : std::int32_t { AVAILABILITY_REMAINS_MASK = 1, AVAILABILITY_TOTAL_MASK = 1, AVAILABILITY_RESALE_MASK = 16, FIRST_SALE_DATE_MASK = 2, LAST_SALE_DATE_MASK = 2, UPGRADE_STARS_MASK = 8, RESELL_MIN_STARS_MASK = 16, TITLE_MASK = 32 }; starGift(); - static const std::int32_t ID = 46953416; + static const std::int32_t ID = -970274264; static object_ptr fetch(TlBufferParser &p); @@ -20006,11 +20163,12 @@ class starGiftUnique final : public StarGift { int32 availability_issued_; int32 availability_total_; string gift_address_; - enum Flags : std::int32_t { OWNER_NAME_MASK = 2, OWNER_ADDRESS_MASK = 4, GIFT_ADDRESS_MASK = 8 }; + int64 resell_stars_; + enum Flags : std::int32_t { OWNER_NAME_MASK = 2, OWNER_ADDRESS_MASK = 4, GIFT_ADDRESS_MASK = 8, RESELL_STARS_MASK = 16 }; starGiftUnique(); - static const std::int32_t ID = 1549979985; + static const std::int32_t ID = 1678891913; static object_ptr fetch(TlBufferParser &p); @@ -20074,13 +20232,14 @@ class starGiftAttributeBackdrop final : public StarGiftAttribute { public: string name_; + int32 backdrop_id_; int32 center_color_; int32 edge_color_; int32 pattern_color_; int32 text_color_; int32 rarity_permille_; - static const std::int32_t ID = -1809377438; + static const std::int32_t ID = -650279524; static object_ptr fetch(TlBufferParser &p); @@ -20110,6 +20269,101 @@ class starGiftAttributeOriginalDetails final : public StarGiftAttribute { void store(TlStorerToString &s, const char *field_name) const final; }; +class StarGiftAttributeId; + +class starGiftAttributeCounter final : public Object { + std::int32_t get_id() const final { + return ID; + } + + public: + object_ptr attribute_; + int32 count_; + + static const std::int32_t ID = 783398488; + + static object_ptr fetch(TlBufferParser &p); + + explicit starGiftAttributeCounter(TlBufferParser &p); + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class StarGiftAttributeId: public Object { + public: + + static object_ptr fetch(TlBufferParser &p); +}; + +class starGiftAttributeIdModel final : public StarGiftAttributeId { + std::int32_t get_id() const final { + return ID; + } + + public: + int64 document_id_; + + explicit starGiftAttributeIdModel(int64 document_id_); + + static const std::int32_t ID = 1219145276; + + static object_ptr fetch(TlBufferParser &p); + + explicit starGiftAttributeIdModel(TlBufferParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class starGiftAttributeIdPattern final : public StarGiftAttributeId { + std::int32_t get_id() const final { + return ID; + } + + public: + int64 document_id_; + + explicit starGiftAttributeIdPattern(int64 document_id_); + + static const std::int32_t ID = 1242965043; + + static object_ptr fetch(TlBufferParser &p); + + explicit starGiftAttributeIdPattern(TlBufferParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + +class starGiftAttributeIdBackdrop final : public StarGiftAttributeId { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 backdrop_id_; + + explicit starGiftAttributeIdBackdrop(int32 backdrop_id_); + + static const std::int32_t ID = 520210263; + + static object_ptr fetch(TlBufferParser &p); + + explicit starGiftAttributeIdBackdrop(TlBufferParser &p); + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class starsAmount; class starRefProgram final : public Object { @@ -20358,6 +20612,7 @@ class starsTransaction final : public Object { bool reaction_; bool stargift_upgrade_; bool business_transfer_; + bool stargift_resale_; string id_; object_ptr stars_; int32 date_; @@ -21521,6 +21776,8 @@ class InlineQueryPeerType; class InputBotInlineMessageID; +class InputGroupCall; + class Message; class MessageEntity; @@ -21575,8 +21832,6 @@ class folderPeer; class groupCallParticipant; -class inputGroupCall; - class langPackDifference; class messageReactions; @@ -23240,7 +23495,7 @@ class updateGroupCallParticipants final : public Update { } public: - object_ptr call_; + object_ptr call_; array> participants_; int32 version_; @@ -24294,6 +24549,26 @@ class updateSentPhoneCode final : public Update { void store(TlStorerToString &s, const char *field_name) const final; }; +class updateGroupCallChainBlocks final : public Update { + std::int32_t get_id() const final { + return ID; + } + + public: + object_ptr call_; + int32 sub_chain_id_; + array blocks_; + int32 next_offset_; + + static const std::int32_t ID = -1535694705; + + static object_ptr fetch(TlBufferParser &p); + + explicit updateGroupCallChainBlocks(TlBufferParser &p); + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class Chat; class MessageEntity; @@ -25075,7 +25350,7 @@ class wallPaperSettings final : public Object { int32 intensity_; int32 rotation_; string emoticon_; - enum Flags : std::int32_t { BLUR_MASK = 2, MOTION_MASK = 4, BACKGROUND_COLOR_MASK = 1, SECOND_BACKGROUND_COLOR_MASK = 16, THIRD_BACKGROUND_COLOR_MASK = 32, FOURTH_BACKGROUND_COLOR_MASK = 64, INTENSITY_MASK = 8, ROTATION_MASK = 16, EMOTICON_MASK = 128 }; + enum Flags : std::int32_t { BACKGROUND_COLOR_MASK = 1, SECOND_BACKGROUND_COLOR_MASK = 16, THIRD_BACKGROUND_COLOR_MASK = 32, FOURTH_BACKGROUND_COLOR_MASK = 64, INTENSITY_MASK = 8, ROTATION_MASK = 16, EMOTICON_MASK = 128 }; wallPaperSettings(); @@ -27762,6 +28037,8 @@ class Peer; class User; +class pendingSuggestion; + class help_PromoData: public Object { public: @@ -27795,15 +28072,18 @@ class help_promoData final : public help_PromoData { bool proxy_; int32 expires_; object_ptr peer_; - array> chats_; - array> users_; string psa_type_; string psa_message_; + array pending_suggestions_; + array dismissed_suggestions_; + object_ptr custom_pending_suggestion_; + array> chats_; + array> users_; enum Flags : std::int32_t { PSA_TYPE_MASK = 2, PSA_MESSAGE_MASK = 4 }; help_promoData(); - static const std::int32_t ID = -1942390465; + static const std::int32_t ID = 145021050; static object_ptr fetch(TlBufferParser &p); @@ -30382,6 +30662,42 @@ class payments_paymentVerificationNeeded final : public payments_PaymentResult { void store(TlStorerToString &s, const char *field_name) const final; }; +class Chat; + +class StarGift; + +class StarGiftAttribute; + +class User; + +class starGiftAttributeCounter; + +class payments_resaleStarGifts final : public Object { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 flags_; + int32 count_; + array> gifts_; + string next_offset_; + array> attributes_; + int64 attributes_hash_; + array> chats_; + array> counters_; + array> users_; + enum Flags : std::int32_t { NEXT_OFFSET_MASK = 1, ATTRIBUTES_HASH_MASK = 2 }; + + payments_resaleStarGifts(); + + static const std::int32_t ID = -1803939105; + + static object_ptr fetch(TlBufferParser &p); + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class paymentRequestedInfo; class payments_savedInfo final : public Object { @@ -31473,6 +31789,23 @@ class stories_allStories final : public stories_AllStories { void store(TlStorerToString &s, const char *field_name) const final; }; +class stories_canSendStoryCount final : public Object { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 count_remains_; + + static const std::int32_t ID = -1014513586; + + static object_ptr fetch(TlBufferParser &p); + + explicit stories_canSendStoryCount(TlBufferParser &p); + + void store(TlStorerToString &s, const char *field_name) const final; +}; + class Chat; class User; @@ -32067,7 +32400,6 @@ class account_addNoPaidMessagesException final : public Function { int32 flags_; bool refund_charged_; object_ptr user_id_; - enum Flags : std::int32_t { REFUND_CHARGED_MASK = 1 }; mutable int32 var0; account_addNoPaidMessagesException(int32 flags_, bool refund_charged_, object_ptr &&user_id_); @@ -32116,7 +32448,7 @@ class account_changeAuthorizationSettings final : public Function { int64 hash_; bool encrypted_requests_disabled_; bool call_requests_disabled_; - enum Flags : std::int32_t { CONFIRMED_MASK = 8, ENCRYPTED_REQUESTS_DISABLED_MASK = 1, CALL_REQUESTS_DISABLED_MASK = 2 }; + enum Flags : std::int32_t { ENCRYPTED_REQUESTS_DISABLED_MASK = 1, CALL_REQUESTS_DISABLED_MASK = 2 }; mutable int32 var0; account_changeAuthorizationSettings(int32 flags_, bool confirmed_, int64 hash_, bool encrypted_requests_disabled_, bool call_requests_disabled_); @@ -32491,7 +32823,6 @@ class account_finishTakeoutSession final : public Function { public: int32 flags_; bool success_; - enum Flags : std::int32_t { SUCCESS_MASK = 1 }; mutable int32 var0; account_finishTakeoutSession(int32 flags_, bool success_); @@ -33020,7 +33351,7 @@ class account_getNotifyExceptions final : public Function { bool compare_sound_; bool compare_stories_; object_ptr peer_; - enum Flags : std::int32_t { COMPARE_SOUND_MASK = 2, COMPARE_STORIES_MASK = 4, PEER_MASK = 1 }; + enum Flags : std::int32_t { PEER_MASK = 1 }; mutable int32 var0; account_getNotifyExceptions(int32 flags_, bool compare_sound_, bool compare_stories_, object_ptr &&peer_); @@ -33439,7 +33770,7 @@ class account_initTakeoutSession final : public Function { bool message_channels_; bool files_; int64 file_max_size_; - enum Flags : std::int32_t { CONTACTS_MASK = 1, MESSAGE_USERS_MASK = 2, MESSAGE_CHATS_MASK = 4, MESSAGE_MEGAGROUPS_MASK = 8, MESSAGE_CHANNELS_MASK = 16, FILES_MASK = 32, FILE_MAX_SIZE_MASK = 32 }; + enum Flags : std::int32_t { FILE_MAX_SIZE_MASK = 32 }; mutable int32 var0; account_initTakeoutSession(int32 flags_, bool contacts_, bool message_users_, bool message_chats_, bool message_megagroups_, bool message_channels_, bool files_, int64 file_max_size_); @@ -33472,7 +33803,7 @@ class account_installTheme final : public Function { object_ptr theme_; string format_; object_ptr base_theme_; - enum Flags : std::int32_t { DARK_MASK = 1, THEME_MASK = 2, FORMAT_MASK = 4, BASE_THEME_MASK = 8 }; + enum Flags : std::int32_t { THEME_MASK = 2, FORMAT_MASK = 4, BASE_THEME_MASK = 8 }; mutable int32 var0; account_installTheme(int32 flags_, bool dark_, object_ptr &&theme_, string const &format_, object_ptr &&base_theme_); @@ -33554,7 +33885,6 @@ class account_registerDevice final : public Function { bool app_sandbox_; bytes secret_; array other_uids_; - enum Flags : std::int32_t { NO_MUTED_MASK = 1 }; mutable int32 var0; account_registerDevice(int32 flags_, bool no_muted_, int32 token_type_, string const &token_, bool app_sandbox_, bytes &&secret_, array &&other_uids_); @@ -33841,7 +34171,6 @@ class account_saveAutoDownloadSettings final : public Function { bool low_; bool high_; object_ptr settings_; - enum Flags : std::int32_t { LOW_MASK = 1, HIGH_MASK = 2 }; mutable int32 var0; account_saveAutoDownloadSettings(int32 flags_, bool low_, bool high_, object_ptr &&settings_); @@ -33875,7 +34204,7 @@ class account_saveAutoSaveSettings final : public Function { bool broadcasts_; object_ptr peer_; object_ptr settings_; - enum Flags : std::int32_t { USERS_MASK = 1, CHATS_MASK = 2, BROADCASTS_MASK = 4, PEER_MASK = 8 }; + enum Flags : std::int32_t { PEER_MASK = 8 }; mutable int32 var0; account_saveAutoSaveSettings(int32 flags_, bool users_, bool chats_, bool broadcasts_, object_ptr &&peer_, object_ptr &&settings_); @@ -34195,7 +34524,6 @@ class account_setContentSettings final : public Function { public: int32 flags_; bool sensitive_enabled_; - enum Flags : std::int32_t { SENSITIVE_ENABLED_MASK = 1 }; mutable int32 var0; account_setContentSettings(int32 flags_, bool sensitive_enabled_); @@ -34570,7 +34898,7 @@ class account_updateColor final : public Function { bool for_profile_; int32 color_; int64 background_emoji_id_; - enum Flags : std::int32_t { FOR_PROFILE_MASK = 2, COLOR_MASK = 4, BACKGROUND_EMOJI_ID_MASK = 1 }; + enum Flags : std::int32_t { COLOR_MASK = 4, BACKGROUND_EMOJI_ID_MASK = 1 }; mutable int32 var0; account_updateColor(int32 flags_, bool for_profile_, int32 color_, int64 background_emoji_id_); @@ -34607,7 +34935,7 @@ class account_updateConnectedBot final : public Function { object_ptr rights_; object_ptr bot_; object_ptr recipients_; - enum Flags : std::int32_t { DELETED_MASK = 2, RIGHTS_MASK = 1 }; + enum Flags : std::int32_t { RIGHTS_MASK = 1 }; mutable int32 var0; account_updateConnectedBot(int32 flags_, bool deleted_, object_ptr &&rights_, object_ptr &&bot_, object_ptr &&recipients_); @@ -34950,7 +35278,6 @@ class account_uploadWallPaper final : public Function { object_ptr file_; string mime_type_; object_ptr settings_; - enum Flags : std::int32_t { FOR_CHAT_MASK = 1 }; mutable int32 var0; account_uploadWallPaper(int32 flags_, bool for_chat_, object_ptr &&file_, string const &mime_type_, object_ptr &&settings_); @@ -35612,7 +35939,6 @@ class auth_signUp final : public Function { string phone_code_hash_; string first_name_; string last_name_; - enum Flags : std::int32_t { NO_JOINED_NOTIFICATIONS_MASK = 1 }; mutable int32 var0; auth_signUp(int32 flags_, bool no_joined_notifications_, string const &phone_number_, string const &phone_code_hash_, string const &first_name_, string const &last_name_); @@ -36333,7 +36659,7 @@ class bots_setCustomVerification final : public Function { object_ptr bot_; object_ptr peer_; string custom_description_; - enum Flags : std::int32_t { ENABLED_MASK = 2, BOT_MASK = 1, CUSTOM_DESCRIPTION_MASK = 4 }; + enum Flags : std::int32_t { BOT_MASK = 1, CUSTOM_DESCRIPTION_MASK = 4 }; mutable int32 var0; bots_setCustomVerification(int32 flags_, bool enabled_, object_ptr &&bot_, object_ptr &&peer_, string const &custom_description_); @@ -36537,7 +36863,7 @@ class channels_createChannel final : public Function { object_ptr geo_point_; string address_; int32 ttl_period_; - enum Flags : std::int32_t { BROADCAST_MASK = 1, MEGAGROUP_MASK = 2, FOR_IMPORT_MASK = 8, FORUM_MASK = 32, GEO_POINT_MASK = 4, ADDRESS_MASK = 4, TTL_PERIOD_MASK = 16 }; + enum Flags : std::int32_t { GEO_POINT_MASK = 4, ADDRESS_MASK = 4, TTL_PERIOD_MASK = 16 }; mutable int32 var0; channels_createChannel(int32 flags_, bool broadcast_, bool megagroup_, bool for_import_, bool forum_, string const &title_, string const &about_, object_ptr &&geo_point_, string const &address_, int32 ttl_period_); @@ -36658,7 +36984,6 @@ class channels_deleteHistory final : public Function { bool for_everyone_; object_ptr channel_; int32 max_id_; - enum Flags : std::int32_t { FOR_EVERYONE_MASK = 1 }; mutable int32 var0; channels_deleteHistory(int32 flags_, bool for_everyone_, object_ptr &&channel_, int32 max_id_); @@ -36999,7 +37324,6 @@ class channels_exportMessageLink final : public Function { bool thread_; object_ptr channel_; int32 id_; - enum Flags : std::int32_t { GROUPED_MASK = 1, THREAD_MASK = 2 }; mutable int32 var0; channels_exportMessageLink(int32 flags_, bool grouped_, bool thread_, object_ptr &&channel_, int32 id_); @@ -37069,7 +37393,6 @@ class channels_getAdminedPublicChannels final : public Function { bool by_location_; bool check_limit_; bool for_personal_; - enum Flags : std::int32_t { BY_LOCATION_MASK = 1, CHECK_LIMIT_MASK = 2, FOR_PERSONAL_MASK = 4 }; mutable int32 var0; channels_getAdminedPublicChannels(int32 flags_, bool by_location_, bool check_limit_, bool for_personal_); @@ -37409,7 +37732,6 @@ class channels_getSendAs final : public Function { int32 flags_; bool for_paid_reactions_; object_ptr peer_; - enum Flags : std::int32_t { FOR_PAID_REACTIONS_MASK = 1 }; mutable int32 var0; channels_getSendAs(int32 flags_, bool for_paid_reactions_, object_ptr &&peer_); @@ -37577,7 +37899,6 @@ class channels_reorderPinnedForumTopics final : public Function { bool force_; object_ptr channel_; array order_; - enum Flags : std::int32_t { FORCE_MASK = 1 }; mutable int32 var0; channels_reorderPinnedForumTopics(int32 flags_, bool force_, object_ptr &&channel_, array &&order_); @@ -37877,6 +38198,34 @@ class InputChannel; class Updates; +class channels_toggleAutotranslation final : public Function { + std::int32_t get_id() const final { + return ID; + } + + public: + object_ptr channel_; + bool enabled_; + + channels_toggleAutotranslation(object_ptr &&channel_, bool enabled_); + + static const std::int32_t ID = 377471137; + + using ReturnType = object_ptr; + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; + + static ReturnType fetch_result(TlBufferParser &p); +}; + +class InputChannel; + +class Updates; + class channels_toggleForum final : public Function { std::int32_t get_id() const final { return ID; @@ -38027,7 +38376,6 @@ class channels_toggleSignatures final : public Function { bool signatures_enabled_; bool profiles_enabled_; object_ptr channel_; - enum Flags : std::int32_t { SIGNATURES_ENABLED_MASK = 1, PROFILES_ENABLED_MASK = 2 }; mutable int32 var0; channels_toggleSignatures(int32 flags_, bool signatures_enabled_, bool profiles_enabled_, object_ptr &&channel_); @@ -38143,7 +38491,7 @@ class channels_updateColor final : public Function { object_ptr channel_; int32 color_; int64 background_emoji_id_; - enum Flags : std::int32_t { FOR_PROFILE_MASK = 2, COLOR_MASK = 4, BACKGROUND_EMOJI_ID_MASK = 1 }; + enum Flags : std::int32_t { COLOR_MASK = 4, BACKGROUND_EMOJI_ID_MASK = 1 }; mutable int32 var0; channels_updateColor(int32 flags_, bool for_profile_, object_ptr &&channel_, int32 color_, int64 background_emoji_id_); @@ -38628,7 +38976,6 @@ class contacts_addContact final : public Function { string first_name_; string last_name_; string phone_; - enum Flags : std::int32_t { ADD_PHONE_PRIVACY_EXCEPTION_MASK = 1 }; mutable int32 var0; contacts_addContact(int32 flags_, bool add_phone_privacy_exception_, object_ptr &&id_, string const &first_name_, string const &last_name_, string const &phone_); @@ -38657,7 +39004,6 @@ class contacts_block final : public Function { int32 flags_; bool my_stories_from_; object_ptr id_; - enum Flags : std::int32_t { MY_STORIES_FROM_MASK = 1 }; mutable int32 var0; contacts_block(int32 flags_, bool my_stories_from_, object_ptr &&id_); @@ -38688,7 +39034,6 @@ class contacts_blockFromReplies final : public Function { bool delete_history_; bool report_spam_; int32 msg_id_; - enum Flags : std::int32_t { DELETE_MESSAGE_MASK = 1, DELETE_HISTORY_MASK = 2, REPORT_SPAM_MASK = 4 }; mutable int32 var0; contacts_blockFromReplies(int32 flags_, bool delete_message_, bool delete_history_, bool report_spam_, int32 msg_id_); @@ -38835,7 +39180,6 @@ class contacts_getBlocked final : public Function { bool my_stories_from_; int32 offset_; int32 limit_; - enum Flags : std::int32_t { MY_STORIES_FROM_MASK = 1 }; mutable int32 var0; contacts_getBlocked(int32 flags_, bool my_stories_from_, int32 offset_, int32 limit_); @@ -38915,7 +39259,7 @@ class contacts_getLocated final : public Function { bool background_; object_ptr geo_point_; int32 self_expires_; - enum Flags : std::int32_t { BACKGROUND_MASK = 2, SELF_EXPIRES_MASK = 1 }; + enum Flags : std::int32_t { SELF_EXPIRES_MASK = 1 }; mutable int32 var0; contacts_getLocated(int32 flags_, bool background_, object_ptr &&geo_point_, int32 self_expires_); @@ -39023,7 +39367,6 @@ class contacts_getTopPeers final : public Function { int32 offset_; int32 limit_; int64 hash_; - enum Flags : std::int32_t { CORRESPONDENTS_MASK = 1, BOTS_PM_MASK = 2, BOTS_INLINE_MASK = 4, PHONE_CALLS_MASK = 8, FORWARD_USERS_MASK = 16, FORWARD_CHATS_MASK = 32, GROUPS_MASK = 1024, CHANNELS_MASK = 32768, BOTS_APP_MASK = 65536 }; mutable int32 var0; contacts_getTopPeers(int32 flags_, bool correspondents_, bool bots_pm_, bool bots_inline_, bool phone_calls_, bool forward_users_, bool forward_chats_, bool groups_, bool channels_, bool bots_app_, int32 offset_, int32 limit_, int64 hash_); @@ -39233,7 +39576,6 @@ class contacts_setBlocked final : public Function { bool my_stories_from_; array> id_; int32 limit_; - enum Flags : std::int32_t { MY_STORIES_FROM_MASK = 1 }; mutable int32 var0; contacts_setBlocked(int32 flags_, bool my_stories_from_, array> &&id_, int32 limit_); @@ -39285,7 +39627,6 @@ class contacts_unblock final : public Function { int32 flags_; bool my_stories_from_; object_ptr id_; - enum Flags : std::int32_t { MY_STORIES_FROM_MASK = 1 }; mutable int32 var0; contacts_unblock(int32 flags_, bool my_stories_from_, object_ptr &&id_); @@ -40242,7 +40583,7 @@ class messages_acceptUrlAuth final : public Function { int32 msg_id_; int32 button_id_; string url_; - enum Flags : std::int32_t { WRITE_ALLOWED_MASK = 1, PEER_MASK = 2, MSG_ID_MASK = 2, BUTTON_ID_MASK = 2, URL_MASK = 4 }; + enum Flags : std::int32_t { PEER_MASK = 2, MSG_ID_MASK = 2, BUTTON_ID_MASK = 2, URL_MASK = 4 }; mutable int32 var0; messages_acceptUrlAuth(int32 flags_, bool write_allowed_, object_ptr &&peer_, int32 msg_id_, int32 button_id_, string const &url_); @@ -40437,7 +40778,6 @@ class messages_clearRecentStickers final : public Function { public: int32 flags_; bool attached_; - enum Flags : std::int32_t { ATTACHED_MASK = 1 }; mutable int32 var0; messages_clearRecentStickers(int32 flags_, bool attached_); @@ -40465,7 +40805,6 @@ class messages_clickSponsoredMessage final : public Function { bool media_; bool fullscreen_; bytes random_id_; - enum Flags : std::int32_t { MEDIA_MASK = 1, FULLSCREEN_MASK = 2 }; mutable int32 var0; messages_clickSponsoredMessage(int32 flags_, bool media_, bool fullscreen_, bytes &&random_id_); @@ -40552,7 +40891,6 @@ class messages_deleteChatUser final : public Function { bool revoke_history_; int64 chat_id_; object_ptr user_id_; - enum Flags : std::int32_t { REVOKE_HISTORY_MASK = 1 }; mutable int32 var0; messages_deleteChatUser(int32 flags_, bool revoke_history_, int64 chat_id_, object_ptr &&user_id_); @@ -40641,7 +40979,7 @@ class messages_deleteHistory final : public Function { int32 max_id_; int32 min_date_; int32 max_date_; - enum Flags : std::int32_t { JUST_CLEAR_MASK = 1, REVOKE_MASK = 2, MIN_DATE_MASK = 4, MAX_DATE_MASK = 8 }; + enum Flags : std::int32_t { MIN_DATE_MASK = 4, MAX_DATE_MASK = 8 }; mutable int32 var0; messages_deleteHistory(int32 flags_, bool just_clear_, bool revoke_, object_ptr &&peer_, int32 max_id_, int32 min_date_, int32 max_date_); @@ -40670,7 +41008,6 @@ class messages_deleteMessages final : public Function { int32 flags_; bool revoke_; array id_; - enum Flags : std::int32_t { REVOKE_MASK = 1 }; mutable int32 var0; messages_deleteMessages(int32 flags_, bool revoke_, array &&id_); @@ -40698,7 +41035,6 @@ class messages_deletePhoneCallHistory final : public Function { public: int32 flags_; bool revoke_; - enum Flags : std::int32_t { REVOKE_MASK = 1 }; mutable int32 var0; messages_deletePhoneCallHistory(int32 flags_, bool revoke_); @@ -40863,7 +41199,6 @@ class messages_discardEncryption final : public Function { int32 flags_; bool delete_history_; int32 chat_id_; - enum Flags : std::int32_t { DELETE_HISTORY_MASK = 1 }; mutable int32 var0; messages_discardEncryption(int32 flags_, bool delete_history_, int32 chat_id_); @@ -41036,7 +41371,7 @@ class messages_editExportedChatInvite final : public Function { int32 usage_limit_; bool request_needed_; string title_; - enum Flags : std::int32_t { REVOKED_MASK = 4, EXPIRE_DATE_MASK = 1, USAGE_LIMIT_MASK = 2, REQUEST_NEEDED_MASK = 8, TITLE_MASK = 16 }; + enum Flags : std::int32_t { EXPIRE_DATE_MASK = 1, USAGE_LIMIT_MASK = 2, REQUEST_NEEDED_MASK = 8, TITLE_MASK = 16 }; mutable int32 var0; messages_editExportedChatInvite(int32 flags_, bool revoked_, object_ptr &&peer_, string const &link_, int32 expire_date_, int32 usage_limit_, bool request_needed_, string const &title_); @@ -41107,7 +41442,7 @@ class messages_editInlineBotMessage final : public Function { object_ptr media_; object_ptr reply_markup_; array> entities_; - enum Flags : std::int32_t { NO_WEBPAGE_MASK = 2, INVERT_MEDIA_MASK = 65536, MESSAGE_MASK = 2048, MEDIA_MASK = 16384, REPLY_MARKUP_MASK = 4, ENTITIES_MASK = 8 }; + enum Flags : std::int32_t { MESSAGE_MASK = 2048, MEDIA_MASK = 16384, REPLY_MARKUP_MASK = 4, ENTITIES_MASK = 8 }; mutable int32 var0; messages_editInlineBotMessage(int32 flags_, bool no_webpage_, bool invert_media_, object_ptr &&id_, string const &message_, object_ptr &&media_, object_ptr &&reply_markup_, array> &&entities_); @@ -41152,7 +41487,7 @@ class messages_editMessage final : public Function { array> entities_; int32 schedule_date_; int32 quick_reply_shortcut_id_; - enum Flags : std::int32_t { NO_WEBPAGE_MASK = 2, INVERT_MEDIA_MASK = 65536, MESSAGE_MASK = 2048, MEDIA_MASK = 16384, REPLY_MARKUP_MASK = 4, ENTITIES_MASK = 8, SCHEDULE_DATE_MASK = 32768, QUICK_REPLY_SHORTCUT_ID_MASK = 131072 }; + enum Flags : std::int32_t { MESSAGE_MASK = 2048, MEDIA_MASK = 16384, REPLY_MARKUP_MASK = 4, ENTITIES_MASK = 8, SCHEDULE_DATE_MASK = 32768, QUICK_REPLY_SHORTCUT_ID_MASK = 131072 }; mutable int32 var0; messages_editMessage(int32 flags_, bool no_webpage_, bool invert_media_, object_ptr &&peer_, int32 id_, string const &message_, object_ptr &&media_, object_ptr &&reply_markup_, array> &&entities_, int32 schedule_date_, int32 quick_reply_shortcut_id_); @@ -41214,7 +41549,7 @@ class messages_exportChatInvite final : public Function { int32 usage_limit_; string title_; object_ptr subscription_pricing_; - enum Flags : std::int32_t { LEGACY_REVOKE_PERMANENT_MASK = 4, REQUEST_NEEDED_MASK = 8, EXPIRE_DATE_MASK = 1, USAGE_LIMIT_MASK = 2, TITLE_MASK = 16, SUBSCRIPTION_PRICING_MASK = 32 }; + enum Flags : std::int32_t { EXPIRE_DATE_MASK = 1, USAGE_LIMIT_MASK = 2, TITLE_MASK = 16, SUBSCRIPTION_PRICING_MASK = 32 }; mutable int32 var0; messages_exportChatInvite(int32 flags_, bool legacy_revoke_permanent_, bool request_needed_, object_ptr &&peer_, int32 expire_date_, int32 usage_limit_, string const &title_, object_ptr &&subscription_pricing_); @@ -41288,7 +41623,7 @@ class messages_forwardMessages final : public Function { object_ptr quick_reply_shortcut_; int32 video_timestamp_; int64 allow_paid_stars_; - enum Flags : std::int32_t { SILENT_MASK = 32, BACKGROUND_MASK = 64, WITH_MY_SCORE_MASK = 256, DROP_AUTHOR_MASK = 2048, DROP_MEDIA_CAPTIONS_MASK = 4096, NOFORWARDS_MASK = 16384, ALLOW_PAID_FLOODSKIP_MASK = 524288, TOP_MSG_ID_MASK = 512, SCHEDULE_DATE_MASK = 1024, SEND_AS_MASK = 8192, QUICK_REPLY_SHORTCUT_MASK = 131072, VIDEO_TIMESTAMP_MASK = 1048576, ALLOW_PAID_STARS_MASK = 2097152 }; + enum Flags : std::int32_t { TOP_MSG_ID_MASK = 512, SCHEDULE_DATE_MASK = 1024, SEND_AS_MASK = 8192, QUICK_REPLY_SHORTCUT_MASK = 131072, VIDEO_TIMESTAMP_MASK = 1048576, ALLOW_PAID_STARS_MASK = 2097152 }; mutable int32 var0; messages_forwardMessages(int32 flags_, bool silent_, bool background_, bool with_my_score_, bool drop_author_, bool drop_media_captions_, bool noforwards_, bool allow_paid_floodskip_, object_ptr &&from_peer_, array &&id_, array &&random_id_, object_ptr &&to_peer_, int32 top_msg_id_, int32 schedule_date_, object_ptr &&send_as_, object_ptr &&quick_reply_shortcut_, int32 video_timestamp_, int64 allow_paid_stars_); @@ -41393,7 +41728,6 @@ class messages_getArchivedStickers final : public Function { bool emojis_; int64 offset_id_; int32 limit_; - enum Flags : std::int32_t { MASKS_MASK = 1, EMOJIS_MASK = 2 }; mutable int32 var0; messages_getArchivedStickers(int32 flags_, bool masks_, bool emojis_, int64 offset_id_, int32 limit_); @@ -41586,7 +41920,7 @@ class messages_getBotCallbackAnswer final : public Function { int32 msg_id_; bytes data_; object_ptr password_; - enum Flags : std::int32_t { GAME_MASK = 2, DATA_MASK = 1, PASSWORD_MASK = 4 }; + enum Flags : std::int32_t { DATA_MASK = 1, PASSWORD_MASK = 4 }; mutable int32 var0; messages_getBotCallbackAnswer(int32 flags_, bool game_, object_ptr &&peer_, int32 msg_id_, bytes &&data_, object_ptr &&password_); @@ -41625,7 +41959,7 @@ class messages_getChatInviteImporters final : public Function { int32 offset_date_; object_ptr offset_user_; int32 limit_; - enum Flags : std::int32_t { REQUESTED_MASK = 1, SUBSCRIPTION_EXPIRED_MASK = 8, LINK_MASK = 2, Q_MASK = 4 }; + enum Flags : std::int32_t { LINK_MASK = 2, Q_MASK = 4 }; mutable int32 var0; messages_getChatInviteImporters(int32 flags_, bool requested_, bool subscription_expired_, object_ptr &&peer_, string const &link_, string const &q_, int32 offset_date_, object_ptr &&offset_user_, int32 limit_); @@ -41857,7 +42191,7 @@ class messages_getDialogs final : public Function { object_ptr offset_peer_; int32 limit_; int64 hash_; - enum Flags : std::int32_t { EXCLUDE_PINNED_MASK = 1, FOLDER_ID_MASK = 2 }; + enum Flags : std::int32_t { FOLDER_ID_MASK = 2 }; mutable int32 var0; messages_getDialogs(int32 flags_, bool exclude_pinned_, int32 folder_id_, int32 offset_date_, int32 offset_id_, object_ptr &&offset_peer_, int32 limit_, int64 hash_); @@ -42203,7 +42537,7 @@ class messages_getExportedChatInvites final : public Function { int32 offset_date_; string offset_link_; int32 limit_; - enum Flags : std::int32_t { REVOKED_MASK = 8, OFFSET_DATE_MASK = 4, OFFSET_LINK_MASK = 4 }; + enum Flags : std::int32_t { OFFSET_DATE_MASK = 4, OFFSET_LINK_MASK = 4 }; mutable int32 var0; messages_getExportedChatInvites(int32 flags_, bool revoked_, object_ptr &&peer_, object_ptr &&admin_id_, int32 offset_date_, string const &offset_link_, int32 limit_); @@ -43153,7 +43487,6 @@ class messages_getRecentStickers final : public Function { int32 flags_; bool attached_; int64 hash_; - enum Flags : std::int32_t { ATTACHED_MASK = 1 }; mutable int32 var0; messages_getRecentStickers(int32 flags_, bool attached_, int64 hash_); @@ -43223,7 +43556,6 @@ class messages_getSavedDialogs final : public Function { object_ptr offset_peer_; int32 limit_; int64 hash_; - enum Flags : std::int32_t { EXCLUDE_PINNED_MASK = 1 }; mutable int32 var0; messages_getSavedDialogs(int32 flags_, bool exclude_pinned_, int32 offset_date_, int32 offset_id_, object_ptr &&offset_peer_, int32 limit_, int64 hash_); @@ -43788,7 +44120,7 @@ class messages_hideAllChatJoinRequests final : public Function { bool approved_; object_ptr peer_; string link_; - enum Flags : std::int32_t { APPROVED_MASK = 1, LINK_MASK = 2 }; + enum Flags : std::int32_t { LINK_MASK = 2 }; mutable int32 var0; messages_hideAllChatJoinRequests(int32 flags_, bool approved_, object_ptr &&peer_, string const &link_); @@ -43822,7 +44154,6 @@ class messages_hideChatJoinRequest final : public Function { bool approved_; object_ptr peer_; object_ptr user_id_; - enum Flags : std::int32_t { APPROVED_MASK = 1 }; mutable int32 var0; messages_hideChatJoinRequest(int32 flags_, bool approved_, object_ptr &&peer_, object_ptr &&user_id_); @@ -43960,7 +44291,6 @@ class messages_markDialogUnread final : public Function { int32 flags_; bool unread_; object_ptr peer_; - enum Flags : std::int32_t { UNREAD_MASK = 1 }; mutable int32 var0; messages_markDialogUnread(int32 flags_, bool unread_, object_ptr &&peer_); @@ -44022,7 +44352,7 @@ class messages_prolongWebView final : public Function { int64 query_id_; object_ptr reply_to_; object_ptr send_as_; - enum Flags : std::int32_t { SILENT_MASK = 32, REPLY_TO_MASK = 1, SEND_AS_MASK = 8192 }; + enum Flags : std::int32_t { REPLY_TO_MASK = 1, SEND_AS_MASK = 8192 }; mutable int32 var0; messages_prolongWebView(int32 flags_, bool silent_, object_ptr &&peer_, object_ptr &&bot_, int64 query_id_, object_ptr &&reply_to_, object_ptr &&send_as_); @@ -44319,7 +44649,6 @@ class messages_reorderPinnedDialogs final : public Function { bool force_; int32 folder_id_; array> order_; - enum Flags : std::int32_t { FORCE_MASK = 1 }; mutable int32 var0; messages_reorderPinnedDialogs(int32 flags_, bool force_, int32 folder_id_, array> &&order_); @@ -44348,7 +44677,6 @@ class messages_reorderPinnedSavedDialogs final : public Function { int32 flags_; bool force_; array> order_; - enum Flags : std::int32_t { FORCE_MASK = 1 }; mutable int32 var0; messages_reorderPinnedSavedDialogs(int32 flags_, bool force_, array> &&order_); @@ -44399,7 +44727,6 @@ class messages_reorderStickerSets final : public Function { bool masks_; bool emojis_; array order_; - enum Flags : std::int32_t { MASKS_MASK = 1, EMOJIS_MASK = 2 }; mutable int32 var0; messages_reorderStickerSets(int32 flags_, bool masks_, bool emojis_, array &&order_); @@ -44484,7 +44811,6 @@ class messages_reportMessagesDelivery final : public Function { bool push_; object_ptr peer_; array id_; - enum Flags : std::int32_t { PUSH_MASK = 1 }; mutable int32 var0; messages_reportMessagesDelivery(int32 flags_, bool push_, object_ptr &&peer_, array &&id_); @@ -44603,7 +44929,7 @@ class messages_requestAppWebView final : public Function { string start_param_; object_ptr theme_params_; string platform_; - enum Flags : std::int32_t { WRITE_ALLOWED_MASK = 1, COMPACT_MASK = 128, FULLSCREEN_MASK = 256, START_PARAM_MASK = 2, THEME_PARAMS_MASK = 4 }; + enum Flags : std::int32_t { START_PARAM_MASK = 2, THEME_PARAMS_MASK = 4 }; mutable int32 var0; messages_requestAppWebView(int32 flags_, bool write_allowed_, bool compact_, bool fullscreen_, object_ptr &&peer_, object_ptr &&app_, string const &start_param_, object_ptr &&theme_params_, string const &platform_); @@ -44672,7 +44998,7 @@ class messages_requestMainWebView final : public Function { string start_param_; object_ptr theme_params_; string platform_; - enum Flags : std::int32_t { COMPACT_MASK = 128, FULLSCREEN_MASK = 256, START_PARAM_MASK = 2, THEME_PARAMS_MASK = 1 }; + enum Flags : std::int32_t { START_PARAM_MASK = 2, THEME_PARAMS_MASK = 1 }; mutable int32 var0; messages_requestMainWebView(int32 flags_, bool compact_, bool fullscreen_, object_ptr &&peer_, object_ptr &&bot_, string const &start_param_, object_ptr &&theme_params_, string const &platform_); @@ -44712,7 +45038,7 @@ class messages_requestSimpleWebView final : public Function { string start_param_; object_ptr theme_params_; string platform_; - enum Flags : std::int32_t { FROM_SWITCH_WEBVIEW_MASK = 2, FROM_SIDE_MENU_MASK = 4, COMPACT_MASK = 128, FULLSCREEN_MASK = 256, URL_MASK = 8, START_PARAM_MASK = 16, THEME_PARAMS_MASK = 1 }; + enum Flags : std::int32_t { URL_MASK = 8, START_PARAM_MASK = 16, THEME_PARAMS_MASK = 1 }; mutable int32 var0; messages_requestSimpleWebView(int32 flags_, bool from_switch_webview_, bool from_side_menu_, bool compact_, bool fullscreen_, object_ptr &&bot_, string const &url_, string const &start_param_, object_ptr &&theme_params_, string const &platform_); @@ -44792,7 +45118,7 @@ class messages_requestWebView final : public Function { string platform_; object_ptr reply_to_; object_ptr send_as_; - enum Flags : std::int32_t { FROM_BOT_MENU_MASK = 16, SILENT_MASK = 32, COMPACT_MASK = 128, FULLSCREEN_MASK = 256, URL_MASK = 2, START_PARAM_MASK = 8, THEME_PARAMS_MASK = 4, REPLY_TO_MASK = 1, SEND_AS_MASK = 8192 }; + enum Flags : std::int32_t { URL_MASK = 2, START_PARAM_MASK = 8, THEME_PARAMS_MASK = 4, REPLY_TO_MASK = 1, SEND_AS_MASK = 8192 }; mutable int32 var0; messages_requestWebView(int32 flags_, bool from_bot_menu_, bool silent_, bool compact_, bool fullscreen_, object_ptr &&peer_, object_ptr &&bot_, string const &url_, string const &start_param_, object_ptr &&theme_params_, string const &platform_, object_ptr &&reply_to_, object_ptr &&send_as_); @@ -44859,7 +45185,7 @@ class messages_saveDraft final : public Function { array> entities_; object_ptr media_; int64 effect_; - enum Flags : std::int32_t { NO_WEBPAGE_MASK = 2, INVERT_MEDIA_MASK = 64, REPLY_TO_MASK = 16, ENTITIES_MASK = 8, MEDIA_MASK = 32, EFFECT_MASK = 128 }; + enum Flags : std::int32_t { REPLY_TO_MASK = 16, ENTITIES_MASK = 8, MEDIA_MASK = 32, EFFECT_MASK = 128 }; mutable int32 var0; messages_saveDraft(int32 flags_, bool no_webpage_, bool invert_media_, object_ptr &&reply_to_, object_ptr &&peer_, string const &message_, array> &&entities_, object_ptr &&media_, int64 effect_); @@ -44951,7 +45277,6 @@ class messages_saveRecentSticker final : public Function { bool attached_; object_ptr id_; bool unsave_; - enum Flags : std::int32_t { ATTACHED_MASK = 1 }; mutable int32 var0; messages_saveRecentSticker(int32 flags_, bool attached_, object_ptr &&id_, bool unsave_); @@ -45055,7 +45380,6 @@ class messages_searchEmojiStickerSets final : public Function { bool exclude_featured_; string q_; int64 hash_; - enum Flags : std::int32_t { EXCLUDE_FEATURED_MASK = 1 }; mutable int32 var0; messages_searchEmojiStickerSets(int32 flags_, bool exclude_featured_, string const &q_, int64 hash_); @@ -45098,7 +45422,7 @@ class messages_searchGlobal final : public Function { object_ptr offset_peer_; int32 offset_id_; int32 limit_; - enum Flags : std::int32_t { BROADCASTS_ONLY_MASK = 2, GROUPS_ONLY_MASK = 4, USERS_ONLY_MASK = 8, FOLDER_ID_MASK = 1 }; + enum Flags : std::int32_t { FOLDER_ID_MASK = 1 }; mutable int32 var0; messages_searchGlobal(int32 flags_, bool broadcasts_only_, bool groups_only_, bool users_only_, int32 folder_id_, string const &q_, object_ptr &&filter_, int32 min_date_, int32 max_date_, int32 offset_rate_, object_ptr &&offset_peer_, int32 offset_id_, int32 limit_); @@ -45157,7 +45481,6 @@ class messages_searchStickerSets final : public Function { bool exclude_featured_; string q_; int64 hash_; - enum Flags : std::int32_t { EXCLUDE_FEATURED_MASK = 1 }; mutable int32 var0; messages_searchStickerSets(int32 flags_, bool exclude_featured_, string const &q_, int64 hash_); @@ -45191,7 +45514,6 @@ class messages_searchStickers final : public Function { int32 offset_; int32 limit_; int64 hash_; - enum Flags : std::int32_t { EMOJIS_MASK = 1 }; mutable int32 var0; messages_searchStickers(int32 flags_, bool emojis_, string const &q_, string const &emoticon_, array &&lang_code_, int32 offset_, int32 limit_, int64 hash_); @@ -45254,7 +45576,6 @@ class messages_sendEncrypted final : public Function { object_ptr peer_; int64 random_id_; bytes data_; - enum Flags : std::int32_t { SILENT_MASK = 1 }; mutable int32 var0; messages_sendEncrypted(int32 flags_, bool silent_, object_ptr &&peer_, int64 random_id_, bytes &&data_); @@ -45290,7 +45611,6 @@ class messages_sendEncryptedFile final : public Function { int64 random_id_; bytes data_; object_ptr file_; - enum Flags : std::int32_t { SILENT_MASK = 1 }; mutable int32 var0; messages_sendEncryptedFile(int32 flags_, bool silent_, object_ptr &&peer_, int64 random_id_, bytes &&data_, object_ptr &&file_); @@ -45365,7 +45685,7 @@ class messages_sendInlineBotResult final : public Function { object_ptr send_as_; object_ptr quick_reply_shortcut_; int64 allow_paid_stars_; - enum Flags : std::int32_t { SILENT_MASK = 32, BACKGROUND_MASK = 64, CLEAR_DRAFT_MASK = 128, HIDE_VIA_MASK = 2048, REPLY_TO_MASK = 1, SCHEDULE_DATE_MASK = 1024, SEND_AS_MASK = 8192, QUICK_REPLY_SHORTCUT_MASK = 131072, ALLOW_PAID_STARS_MASK = 2097152 }; + enum Flags : std::int32_t { REPLY_TO_MASK = 1, SCHEDULE_DATE_MASK = 1024, SEND_AS_MASK = 8192, QUICK_REPLY_SHORTCUT_MASK = 131072, ALLOW_PAID_STARS_MASK = 2097152 }; mutable int32 var0; messages_sendInlineBotResult(int32 flags_, bool silent_, bool background_, bool clear_draft_, bool hide_via_, object_ptr &&peer_, object_ptr &&reply_to_, int64 random_id_, int64 query_id_, string const &id_, int32 schedule_date_, object_ptr &&send_as_, object_ptr &&quick_reply_shortcut_, int64 allow_paid_stars_); @@ -45423,7 +45743,7 @@ class messages_sendMedia final : public Function { object_ptr quick_reply_shortcut_; int64 effect_; int64 allow_paid_stars_; - enum Flags : std::int32_t { SILENT_MASK = 32, BACKGROUND_MASK = 64, CLEAR_DRAFT_MASK = 128, NOFORWARDS_MASK = 16384, UPDATE_STICKERSETS_ORDER_MASK = 32768, INVERT_MEDIA_MASK = 65536, ALLOW_PAID_FLOODSKIP_MASK = 524288, REPLY_TO_MASK = 1, REPLY_MARKUP_MASK = 4, ENTITIES_MASK = 8, SCHEDULE_DATE_MASK = 1024, SEND_AS_MASK = 8192, QUICK_REPLY_SHORTCUT_MASK = 131072, EFFECT_MASK = 262144, ALLOW_PAID_STARS_MASK = 2097152 }; + enum Flags : std::int32_t { REPLY_TO_MASK = 1, REPLY_MARKUP_MASK = 4, ENTITIES_MASK = 8, SCHEDULE_DATE_MASK = 1024, SEND_AS_MASK = 8192, QUICK_REPLY_SHORTCUT_MASK = 131072, EFFECT_MASK = 262144, ALLOW_PAID_STARS_MASK = 2097152 }; mutable int32 var0; messages_sendMedia(int32 flags_, bool silent_, bool background_, bool clear_draft_, bool noforwards_, bool update_stickersets_order_, bool invert_media_, bool allow_paid_floodskip_, object_ptr &&peer_, object_ptr &&reply_to_, object_ptr &&media_, string const &message_, int64 random_id_, object_ptr &&reply_markup_, array> &&entities_, int32 schedule_date_, object_ptr &&send_as_, object_ptr &&quick_reply_shortcut_, int64 effect_, int64 allow_paid_stars_); @@ -45479,7 +45799,7 @@ class messages_sendMessage final : public Function { object_ptr quick_reply_shortcut_; int64 effect_; int64 allow_paid_stars_; - enum Flags : std::int32_t { NO_WEBPAGE_MASK = 2, SILENT_MASK = 32, BACKGROUND_MASK = 64, CLEAR_DRAFT_MASK = 128, NOFORWARDS_MASK = 16384, UPDATE_STICKERSETS_ORDER_MASK = 32768, INVERT_MEDIA_MASK = 65536, ALLOW_PAID_FLOODSKIP_MASK = 524288, REPLY_TO_MASK = 1, REPLY_MARKUP_MASK = 4, ENTITIES_MASK = 8, SCHEDULE_DATE_MASK = 1024, SEND_AS_MASK = 8192, QUICK_REPLY_SHORTCUT_MASK = 131072, EFFECT_MASK = 262144, ALLOW_PAID_STARS_MASK = 2097152 }; + enum Flags : std::int32_t { REPLY_TO_MASK = 1, REPLY_MARKUP_MASK = 4, ENTITIES_MASK = 8, SCHEDULE_DATE_MASK = 1024, SEND_AS_MASK = 8192, QUICK_REPLY_SHORTCUT_MASK = 131072, EFFECT_MASK = 262144, ALLOW_PAID_STARS_MASK = 2097152 }; mutable int32 var0; messages_sendMessage(int32 flags_, bool no_webpage_, bool silent_, bool background_, bool clear_draft_, bool noforwards_, bool update_stickersets_order_, bool invert_media_, bool allow_paid_floodskip_, object_ptr &&peer_, object_ptr &&reply_to_, string const &message_, int64 random_id_, object_ptr &&reply_markup_, array> &&entities_, int32 schedule_date_, object_ptr &&send_as_, object_ptr &&quick_reply_shortcut_, int64 effect_, int64 allow_paid_stars_); @@ -45529,7 +45849,7 @@ class messages_sendMultiMedia final : public Function { object_ptr quick_reply_shortcut_; int64 effect_; int64 allow_paid_stars_; - enum Flags : std::int32_t { SILENT_MASK = 32, BACKGROUND_MASK = 64, CLEAR_DRAFT_MASK = 128, NOFORWARDS_MASK = 16384, UPDATE_STICKERSETS_ORDER_MASK = 32768, INVERT_MEDIA_MASK = 65536, ALLOW_PAID_FLOODSKIP_MASK = 524288, REPLY_TO_MASK = 1, SCHEDULE_DATE_MASK = 1024, SEND_AS_MASK = 8192, QUICK_REPLY_SHORTCUT_MASK = 131072, EFFECT_MASK = 262144, ALLOW_PAID_STARS_MASK = 2097152 }; + enum Flags : std::int32_t { REPLY_TO_MASK = 1, SCHEDULE_DATE_MASK = 1024, SEND_AS_MASK = 8192, QUICK_REPLY_SHORTCUT_MASK = 131072, EFFECT_MASK = 262144, ALLOW_PAID_STARS_MASK = 2097152 }; mutable int32 var0; messages_sendMultiMedia(int32 flags_, bool silent_, bool background_, bool clear_draft_, bool noforwards_, bool update_stickersets_order_, bool invert_media_, bool allow_paid_floodskip_, object_ptr &&peer_, object_ptr &&reply_to_, array> &&multi_media_, int32 schedule_date_, object_ptr &&send_as_, object_ptr &&quick_reply_shortcut_, int64 effect_, int64 allow_paid_stars_); @@ -45631,7 +45951,7 @@ class messages_sendReaction final : public Function { object_ptr peer_; int32 msg_id_; array> reaction_; - enum Flags : std::int32_t { BIG_MASK = 2, ADD_TO_RECENT_MASK = 4, REACTION_MASK = 1 }; + enum Flags : std::int32_t { REACTION_MASK = 1 }; mutable int32 var0; messages_sendReaction(int32 flags_, bool big_, bool add_to_recent_, object_ptr &&peer_, int32 msg_id_, array> &&reaction_); @@ -45807,7 +46127,7 @@ class messages_setBotCallbackAnswer final : public Function { string message_; string url_; int32 cache_time_; - enum Flags : std::int32_t { ALERT_MASK = 2, MESSAGE_MASK = 1, URL_MASK = 4 }; + enum Flags : std::int32_t { MESSAGE_MASK = 1, URL_MASK = 4 }; mutable int32 var0; messages_setBotCallbackAnswer(int32 flags_, bool alert_, int64 query_id_, string const &message_, string const &url_, int32 cache_time_); @@ -45835,7 +46155,7 @@ class messages_setBotPrecheckoutResults final : public Function { bool success_; int64 query_id_; string error_; - enum Flags : std::int32_t { SUCCESS_MASK = 2, ERROR_MASK = 1 }; + enum Flags : std::int32_t { ERROR_MASK = 1 }; mutable int32 var0; messages_setBotPrecheckoutResults(int32 flags_, bool success_, int64 query_id_, string const &error_); @@ -45967,7 +46287,7 @@ class messages_setChatWallPaper final : public Function { object_ptr wallpaper_; object_ptr settings_; int32 id_; - enum Flags : std::int32_t { FOR_BOTH_MASK = 8, REVERT_MASK = 16, WALLPAPER_MASK = 1, SETTINGS_MASK = 4, ID_MASK = 2 }; + enum Flags : std::int32_t { WALLPAPER_MASK = 1, SETTINGS_MASK = 4, ID_MASK = 2 }; mutable int32 var0; messages_setChatWallPaper(int32 flags_, bool for_both_, bool revert_, object_ptr &&peer_, object_ptr &&wallpaper_, object_ptr &&settings_, int32 id_); @@ -46078,7 +46398,6 @@ class messages_setGameScore final : public Function { int32 id_; object_ptr user_id_; int32 score_; - enum Flags : std::int32_t { EDIT_MESSAGE_MASK = 1, FORCE_MASK = 2 }; mutable int32 var0; messages_setGameScore(int32 flags_, bool edit_message_, bool force_, object_ptr &&peer_, int32 id_, object_ptr &&user_id_, int32 score_); @@ -46145,7 +46464,7 @@ class messages_setInlineBotResults final : public Function { string next_offset_; object_ptr switch_pm_; object_ptr switch_webview_; - enum Flags : std::int32_t { GALLERY_MASK = 1, PRIVATE_MASK = 2, NEXT_OFFSET_MASK = 4, SWITCH_PM_MASK = 8, SWITCH_WEBVIEW_MASK = 16 }; + enum Flags : std::int32_t { NEXT_OFFSET_MASK = 4, SWITCH_PM_MASK = 8, SWITCH_WEBVIEW_MASK = 16 }; mutable int32 var0; messages_setInlineBotResults(int32 flags_, bool gallery_, bool private_, int64 query_id_, array> &&results_, int32 cache_time_, string const &next_offset_, object_ptr &&switch_pm_, object_ptr &&switch_webview_); @@ -46179,7 +46498,6 @@ class messages_setInlineGameScore final : public Function { object_ptr id_; object_ptr user_id_; int32 score_; - enum Flags : std::int32_t { EDIT_MESSAGE_MASK = 1, FORCE_MASK = 2 }; mutable int32 var0; messages_setInlineGameScore(int32 flags_, bool edit_message_, bool force_, object_ptr &&id_, object_ptr &&user_id_, int32 score_); @@ -46299,7 +46617,6 @@ class messages_toggleBotInAttachMenu final : public Function { bool write_allowed_; object_ptr bot_; bool enabled_; - enum Flags : std::int32_t { WRITE_ALLOWED_MASK = 1 }; mutable int32 var0; messages_toggleBotInAttachMenu(int32 flags_, bool write_allowed_, object_ptr &&bot_, bool enabled_); @@ -46351,7 +46668,6 @@ class messages_toggleDialogPin final : public Function { int32 flags_; bool pinned_; object_ptr peer_; - enum Flags : std::int32_t { PINNED_MASK = 1 }; mutable int32 var0; messages_toggleDialogPin(int32 flags_, bool pinned_, object_ptr &&peer_); @@ -46437,7 +46753,6 @@ class messages_togglePeerTranslations final : public Function { int32 flags_; bool disabled_; object_ptr peer_; - enum Flags : std::int32_t { DISABLED_MASK = 1 }; mutable int32 var0; messages_togglePeerTranslations(int32 flags_, bool disabled_, object_ptr &&peer_); @@ -46466,7 +46781,6 @@ class messages_toggleSavedDialogPin final : public Function { int32 flags_; bool pinned_; object_ptr peer_; - enum Flags : std::int32_t { PINNED_MASK = 1 }; mutable int32 var0; messages_toggleSavedDialogPin(int32 flags_, bool pinned_, object_ptr &&peer_); @@ -46497,7 +46811,6 @@ class messages_toggleStickerSets final : public Function { bool archive_; bool unarchive_; array> stickersets_; - enum Flags : std::int32_t { UNINSTALL_MASK = 1, ARCHIVE_MASK = 2, UNARCHIVE_MASK = 4 }; mutable int32 var0; messages_toggleStickerSets(int32 flags_, bool uninstall_, bool archive_, bool unarchive_, array> &&stickersets_); @@ -46702,7 +47015,6 @@ class messages_updatePinnedMessage final : public Function { bool pm_oneside_; object_ptr peer_; int32 id_; - enum Flags : std::int32_t { SILENT_MASK = 1, UNPIN_MASK = 2, PM_ONESIDE_MASK = 4 }; mutable int32 var0; messages_updatePinnedMessage(int32 flags_, bool silent_, bool unpin_, bool pm_oneside_, object_ptr &&peer_, int32 id_); @@ -46963,7 +47275,6 @@ class payments_botCancelStarsSubscription final : public Function { bool restore_; object_ptr user_id_; string charge_id_; - enum Flags : std::int32_t { RESTORE_MASK = 1 }; mutable int32 var0; payments_botCancelStarsSubscription(int32 flags_, bool restore_, object_ptr &&user_id_, string const &charge_id_); @@ -47070,7 +47381,6 @@ class payments_clearSavedInfo final : public Function { int32 flags_; bool credentials_; bool info_; - enum Flags : std::int32_t { CREDENTIALS_MASK = 1, INFO_MASK = 2 }; mutable int32 var0; payments_clearSavedInfo(int32 flags_, bool credentials_, bool info_); @@ -47157,7 +47467,6 @@ class payments_editConnectedStarRefBot final : public Function { bool revoked_; object_ptr peer_; string link_; - enum Flags : std::int32_t { REVOKED_MASK = 1 }; mutable int32 var0; payments_editConnectedStarRefBot(int32 flags_, bool revoked_, object_ptr &&peer_, string const &link_); @@ -47435,6 +47744,42 @@ class payments_getPremiumGiftCodeOptions final : public Function { static ReturnType fetch_result(TlBufferParser &p); }; +class StarGiftAttributeId; + +class payments_resaleStarGifts; + +class payments_getResaleStarGifts final : public Function { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 flags_; + bool sort_by_price_; + bool sort_by_num_; + int64 attributes_hash_; + int64 gift_id_; + array> attributes_; + string offset_; + int32 limit_; + enum Flags : std::int32_t { ATTRIBUTES_HASH_MASK = 1, ATTRIBUTES_MASK = 8 }; + mutable int32 var0; + + payments_getResaleStarGifts(int32 flags_, bool sort_by_price_, bool sort_by_num_, int64 attributes_hash_, int64 gift_id_, array> &&attributes_, string const &offset_, int32 limit_); + + static const std::int32_t ID = 2053087798; + + using ReturnType = object_ptr; + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; + + static ReturnType fetch_result(TlBufferParser &p); +}; + class payments_savedInfo; class payments_getSavedInfo final : public Function { @@ -47504,7 +47849,6 @@ class payments_getSavedStarGifts final : public Function { object_ptr peer_; string offset_; int32 limit_; - enum Flags : std::int32_t { EXCLUDE_UNSAVED_MASK = 1, EXCLUDE_SAVED_MASK = 2, EXCLUDE_UNLIMITED_MASK = 4, EXCLUDE_LIMITED_MASK = 8, EXCLUDE_UNIQUE_MASK = 16, SORT_BY_VALUE_MASK = 32 }; mutable int32 var0; payments_getSavedStarGifts(int32 flags_, bool exclude_unsaved_, bool exclude_saved_, bool exclude_unlimited_, bool exclude_limited_, bool exclude_unique_, bool sort_by_value_, object_ptr &&peer_, string const &offset_, int32 limit_); @@ -47694,7 +48038,6 @@ class payments_getStarsRevenueStats final : public Function { int32 flags_; bool dark_; object_ptr peer_; - enum Flags : std::int32_t { DARK_MASK = 1 }; mutable int32 var0; payments_getStarsRevenueStats(int32 flags_, bool dark_, object_ptr &&peer_); @@ -47784,7 +48127,6 @@ class payments_getStarsSubscriptions final : public Function { bool missing_balance_; object_ptr peer_; string offset_; - enum Flags : std::int32_t { MISSING_BALANCE_MASK = 1 }; mutable int32 var0; payments_getStarsSubscriptions(int32 flags_, bool missing_balance_, object_ptr &&peer_, string const &offset_); @@ -47842,7 +48184,7 @@ class payments_getStarsTransactions final : public Function { object_ptr peer_; string offset_; int32 limit_; - enum Flags : std::int32_t { INBOUND_MASK = 1, OUTBOUND_MASK = 2, ASCENDING_MASK = 4, SUBSCRIPTION_ID_MASK = 8 }; + enum Flags : std::int32_t { SUBSCRIPTION_ID_MASK = 8 }; mutable int32 var0; payments_getStarsTransactions(int32 flags_, bool inbound_, bool outbound_, bool ascending_, string const &subscription_id_, object_ptr &&peer_, string const &offset_, int32 limit_); @@ -47906,7 +48248,6 @@ class payments_getSuggestedStarRefBots final : public Function { object_ptr peer_; string offset_; int32 limit_; - enum Flags : std::int32_t { ORDER_BY_REVENUE_MASK = 1, ORDER_BY_DATE_MASK = 2 }; mutable int32 var0; payments_getSuggestedStarRefBots(int32 flags_, bool order_by_revenue_, bool order_by_date_, object_ptr &&peer_, string const &offset_, int32 limit_); @@ -48019,7 +48360,6 @@ class payments_saveStarGift final : public Function { int32 flags_; bool unsave_; object_ptr stargift_; - enum Flags : std::int32_t { UNSAVE_MASK = 1 }; mutable int32 var0; payments_saveStarGift(int32 flags_, bool unsave_, object_ptr &&stargift_); @@ -48113,7 +48453,6 @@ class payments_toggleChatStarGiftNotifications final : public Function { int32 flags_; bool enabled_; object_ptr peer_; - enum Flags : std::int32_t { ENABLED_MASK = 1 }; mutable int32 var0; payments_toggleChatStarGiftNotifications(int32 flags_, bool enabled_, object_ptr &&peer_); @@ -48193,6 +48532,34 @@ class InputSavedStarGift; class Updates; +class payments_updateStarGiftPrice final : public Function { + std::int32_t get_id() const final { + return ID; + } + + public: + object_ptr stargift_; + int64 resell_stars_; + + payments_updateStarGiftPrice(object_ptr &&stargift_, int64 resell_stars_); + + static const std::int32_t ID = 1001301217; + + using ReturnType = object_ptr; + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; + + static ReturnType fetch_result(TlBufferParser &p); +}; + +class InputSavedStarGift; + +class Updates; + class payments_upgradeStarGift final : public Function { std::int32_t get_id() const final { return ID; @@ -48202,7 +48569,6 @@ class payments_upgradeStarGift final : public Function { int32 flags_; bool keep_original_details_; object_ptr stargift_; - enum Flags : std::int32_t { KEEP_ORIGINAL_DETAILS_MASK = 1 }; mutable int32 var0; payments_upgradeStarGift(int32 flags_, bool keep_original_details_, object_ptr &&stargift_); @@ -48236,7 +48602,6 @@ class payments_validateRequestedInfo final : public Function { bool save_; object_ptr invoice_; object_ptr info_; - enum Flags : std::int32_t { SAVE_MASK = 1 }; mutable int32 var0; payments_validateRequestedInfo(int32 flags_, bool save_, object_ptr &&invoice_, object_ptr &&info_); @@ -48285,7 +48650,7 @@ class phone_acceptCall final : public Function { static ReturnType fetch_result(TlBufferParser &p); }; -class inputGroupCall; +class InputGroupCall; class phone_checkGroupCall final : public Function { std::int32_t get_id() const final { @@ -48293,10 +48658,10 @@ class phone_checkGroupCall final : public Function { } public: - object_ptr call_; + object_ptr call_; array sources_; - phone_checkGroupCall(object_ptr &&call_, array &&sources_); + phone_checkGroupCall(object_ptr &&call_, array &&sources_); static const std::int32_t ID = -1248003721; @@ -48343,9 +48708,9 @@ class phone_confirmCall final : public Function { static ReturnType fetch_result(TlBufferParser &p); }; -class inputPhoneCall; +class Updates; -class phone_phoneCall; +class dataJSON; class phone_createConferenceCall final : public Function { std::int32_t get_id() const final { @@ -48353,14 +48718,22 @@ class phone_createConferenceCall final : public Function { } public: - object_ptr peer_; - int64 key_fingerprint_; + int32 flags_; + bool muted_; + bool video_stopped_; + bool join_; + int32 random_id_; + UInt256 public_key_; + bytes block_; + object_ptr params_; + enum Flags : std::int32_t { PUBLIC_KEY_MASK = 8, BLOCK_MASK = 8, PARAMS_MASK = 8 }; + mutable int32 var0; - phone_createConferenceCall(object_ptr &&peer_, int64 key_fingerprint_); + phone_createConferenceCall(int32 flags_, bool muted_, bool video_stopped_, bool join_, int32 random_id_, UInt256 const &public_key_, bytes &&block_, object_ptr &¶ms_); - static const std::int32_t ID = -540472917; + static const std::int32_t ID = 2097431739; - using ReturnType = object_ptr; + using ReturnType = object_ptr; void store(TlStorerCalcLength &s) const final; @@ -48387,7 +48760,7 @@ class phone_createGroupCall final : public Function { int32 random_id_; string title_; int32 schedule_date_; - enum Flags : std::int32_t { RTMP_STREAM_MASK = 4, TITLE_MASK = 1, SCHEDULE_DATE_MASK = 2 }; + enum Flags : std::int32_t { TITLE_MASK = 1, SCHEDULE_DATE_MASK = 2 }; mutable int32 var0; phone_createGroupCall(int32 flags_, bool rtmp_stream_, object_ptr &&peer_, int32 random_id_, string const &title_, int32 schedule_date_); @@ -48405,6 +48778,64 @@ class phone_createGroupCall final : public Function { static ReturnType fetch_result(TlBufferParser &p); }; +class Updates; + +class phone_declineConferenceCallInvite final : public Function { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 msg_id_; + + explicit phone_declineConferenceCallInvite(int32 msg_id_); + + static const std::int32_t ID = 1011325297; + + using ReturnType = object_ptr; + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; + + static ReturnType fetch_result(TlBufferParser &p); +}; + +class InputGroupCall; + +class Updates; + +class phone_deleteConferenceCallParticipants final : public Function { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 flags_; + bool only_left_; + bool kick_; + object_ptr call_; + array ids_; + bytes block_; + mutable int32 var0; + + phone_deleteConferenceCallParticipants(int32 flags_, bool only_left_, bool kick_, object_ptr &&call_, array &&ids_, bytes &&block_); + + static const std::int32_t ID = -1935276763; + + using ReturnType = object_ptr; + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; + + static ReturnType fetch_result(TlBufferParser &p); +}; + class PhoneCallDiscardReason; class Updates; @@ -48423,7 +48854,6 @@ class phone_discardCall final : public Function { int32 duration_; object_ptr reason_; int64 connection_id_; - enum Flags : std::int32_t { VIDEO_MASK = 1 }; mutable int32 var0; phone_discardCall(int32 flags_, bool video_, object_ptr &&peer_, int32 duration_, object_ptr &&reason_, int64 connection_id_); @@ -48441,9 +48871,9 @@ class phone_discardCall final : public Function { static ReturnType fetch_result(TlBufferParser &p); }; -class Updates; +class InputGroupCall; -class inputGroupCall; +class Updates; class phone_discardGroupCall final : public Function { std::int32_t get_id() const final { @@ -48451,9 +48881,9 @@ class phone_discardGroupCall final : public Function { } public: - object_ptr call_; + object_ptr call_; - explicit phone_discardGroupCall(object_ptr &&call_); + explicit phone_discardGroupCall(object_ptr &&call_); static const std::int32_t ID = 2054648117; @@ -48468,12 +48898,12 @@ class phone_discardGroupCall final : public Function { static ReturnType fetch_result(TlBufferParser &p); }; +class InputGroupCall; + class InputPeer; class Updates; -class inputGroupCall; - class phone_editGroupCallParticipant final : public Function { std::int32_t get_id() const final { return ID; @@ -48481,7 +48911,7 @@ class phone_editGroupCallParticipant final : public Function { public: int32 flags_; - object_ptr call_; + object_ptr call_; object_ptr participant_; bool muted_; int32 volume_; @@ -48492,7 +48922,7 @@ class phone_editGroupCallParticipant final : public Function { enum Flags : std::int32_t { MUTED_MASK = 1, VOLUME_MASK = 2, RAISE_HAND_MASK = 4, VIDEO_STOPPED_MASK = 8, VIDEO_PAUSED_MASK = 16, PRESENTATION_PAUSED_MASK = 32 }; mutable int32 var0; - phone_editGroupCallParticipant(int32 flags_, object_ptr &&call_, object_ptr &&participant_, bool muted_, int32 volume_, bool raise_hand_, bool video_stopped_, bool video_paused_, bool presentation_paused_); + phone_editGroupCallParticipant(int32 flags_, object_ptr &&call_, object_ptr &&participant_, bool muted_, int32 volume_, bool raise_hand_, bool video_stopped_, bool video_paused_, bool presentation_paused_); static const std::int32_t ID = -1524155713; @@ -48507,9 +48937,9 @@ class phone_editGroupCallParticipant final : public Function { static ReturnType fetch_result(TlBufferParser &p); }; -class Updates; +class InputGroupCall; -class inputGroupCall; +class Updates; class phone_editGroupCallTitle final : public Function { std::int32_t get_id() const final { @@ -48517,10 +48947,10 @@ class phone_editGroupCallTitle final : public Function { } public: - object_ptr call_; + object_ptr call_; string title_; - phone_editGroupCallTitle(object_ptr &&call_, string const &title_); + phone_editGroupCallTitle(object_ptr &&call_, string const &title_); static const std::int32_t ID = 480685066; @@ -48535,7 +48965,7 @@ class phone_editGroupCallTitle final : public Function { static ReturnType fetch_result(TlBufferParser &p); }; -class inputGroupCall; +class InputGroupCall; class phone_exportedGroupCallInvite; @@ -48547,11 +48977,10 @@ class phone_exportGroupCallInvite final : public Function { public: int32 flags_; bool can_self_unmute_; - object_ptr call_; - enum Flags : std::int32_t { CAN_SELF_UNMUTE_MASK = 1 }; + object_ptr call_; mutable int32 var0; - phone_exportGroupCallInvite(int32 flags_, bool can_self_unmute_, object_ptr &&call_); + phone_exportGroupCallInvite(int32 flags_, bool can_self_unmute_, object_ptr &&call_); static const std::int32_t ID = -425040769; @@ -48588,7 +49017,7 @@ class phone_getCallConfig final : public Function { static ReturnType fetch_result(TlBufferParser &p); }; -class inputGroupCall; +class InputGroupCall; class phone_groupCall; @@ -48598,10 +49027,10 @@ class phone_getGroupCall final : public Function { } public: - object_ptr call_; + object_ptr call_; int32 limit_; - phone_getGroupCall(object_ptr &&call_, int32 limit_); + phone_getGroupCall(object_ptr &&call_, int32 limit_); static const std::int32_t ID = 68699611; @@ -48616,6 +49045,36 @@ class phone_getGroupCall final : public Function { static ReturnType fetch_result(TlBufferParser &p); }; +class InputGroupCall; + +class Updates; + +class phone_getGroupCallChainBlocks final : public Function { + std::int32_t get_id() const final { + return ID; + } + + public: + object_ptr call_; + int32 sub_chain_id_; + int32 offset_; + int32 limit_; + + phone_getGroupCallChainBlocks(object_ptr &&call_, int32 sub_chain_id_, int32 offset_, int32 limit_); + + static const std::int32_t ID = -291534682; + + using ReturnType = object_ptr; + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; + + static ReturnType fetch_result(TlBufferParser &p); +}; + class InputPeer; class phone_joinAsPeers; @@ -48643,7 +49102,7 @@ class phone_getGroupCallJoinAs final : public Function { static ReturnType fetch_result(TlBufferParser &p); }; -class inputGroupCall; +class InputGroupCall; class phone_groupCallStreamChannels; @@ -48653,9 +49112,9 @@ class phone_getGroupCallStreamChannels final : public Function { } public: - object_ptr call_; + object_ptr call_; - explicit phone_getGroupCallStreamChannels(object_ptr &&call_); + explicit phone_getGroupCallStreamChannels(object_ptr &&call_); static const std::int32_t ID = 447879488; @@ -48698,9 +49157,9 @@ class phone_getGroupCallStreamRtmpUrl final : public Function { static ReturnType fetch_result(TlBufferParser &p); }; -class InputPeer; +class InputGroupCall; -class inputGroupCall; +class InputPeer; class phone_groupParticipants; @@ -48710,13 +49169,13 @@ class phone_getGroupParticipants final : public Function { } public: - object_ptr call_; + object_ptr call_; array> ids_; array sources_; string offset_; int32 limit_; - phone_getGroupParticipants(object_ptr &&call_, array> &&ids_, array &&sources_, string const &offset_, int32 limit_); + phone_getGroupParticipants(object_ptr &&call_, array> &&ids_, array &&sources_, string const &offset_, int32 limit_); static const std::int32_t ID = -984033109; @@ -48731,11 +49190,44 @@ class phone_getGroupParticipants final : public Function { static ReturnType fetch_result(TlBufferParser &p); }; +class InputGroupCall; + class InputUser; class Updates; -class inputGroupCall; +class phone_inviteConferenceCallParticipant final : public Function { + std::int32_t get_id() const final { + return ID; + } + + public: + int32 flags_; + bool video_; + object_ptr call_; + object_ptr user_id_; + mutable int32 var0; + + phone_inviteConferenceCallParticipant(int32 flags_, bool video_, object_ptr &&call_, object_ptr &&user_id_); + + static const std::int32_t ID = -1124981115; + + using ReturnType = object_ptr; + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; + + static ReturnType fetch_result(TlBufferParser &p); +}; + +class InputGroupCall; + +class InputUser; + +class Updates; class phone_inviteToGroupCall final : public Function { std::int32_t get_id() const final { @@ -48743,10 +49235,10 @@ class phone_inviteToGroupCall final : public Function { } public: - object_ptr call_; + object_ptr call_; array> users_; - phone_inviteToGroupCall(object_ptr &&call_, array> &&users_); + phone_inviteToGroupCall(object_ptr &&call_, array> &&users_); static const std::int32_t ID = 2067345760; @@ -48761,14 +49253,14 @@ class phone_inviteToGroupCall final : public Function { static ReturnType fetch_result(TlBufferParser &p); }; +class InputGroupCall; + class InputPeer; class Updates; class dataJSON; -class inputGroupCall; - class phone_joinGroupCall final : public Function { std::int32_t get_id() const final { return ID; @@ -48778,17 +49270,18 @@ class phone_joinGroupCall final : public Function { int32 flags_; bool muted_; bool video_stopped_; - object_ptr call_; + object_ptr call_; object_ptr join_as_; string invite_hash_; - int64 key_fingerprint_; + UInt256 public_key_; + bytes block_; object_ptr params_; - enum Flags : std::int32_t { MUTED_MASK = 1, VIDEO_STOPPED_MASK = 4, INVITE_HASH_MASK = 2, KEY_FINGERPRINT_MASK = 8 }; + enum Flags : std::int32_t { INVITE_HASH_MASK = 2, PUBLIC_KEY_MASK = 8, BLOCK_MASK = 8 }; mutable int32 var0; - phone_joinGroupCall(int32 flags_, bool muted_, bool video_stopped_, object_ptr &&call_, object_ptr &&join_as_, string const &invite_hash_, int64 key_fingerprint_, object_ptr &¶ms_); + phone_joinGroupCall(int32 flags_, bool muted_, bool video_stopped_, object_ptr &&call_, object_ptr &&join_as_, string const &invite_hash_, UInt256 const &public_key_, bytes &&block_, object_ptr &¶ms_); - static const std::int32_t ID = -702669325; + static const std::int32_t ID = -1883951017; using ReturnType = object_ptr; @@ -48801,22 +49294,22 @@ class phone_joinGroupCall final : public Function { static ReturnType fetch_result(TlBufferParser &p); }; +class InputGroupCall; + class Updates; class dataJSON; -class inputGroupCall; - class phone_joinGroupCallPresentation final : public Function { std::int32_t get_id() const final { return ID; } public: - object_ptr call_; + object_ptr call_; object_ptr params_; - phone_joinGroupCallPresentation(object_ptr &&call_, object_ptr &¶ms_); + phone_joinGroupCallPresentation(object_ptr &&call_, object_ptr &¶ms_); static const std::int32_t ID = -873829436; @@ -48831,9 +49324,9 @@ class phone_joinGroupCallPresentation final : public Function { static ReturnType fetch_result(TlBufferParser &p); }; -class Updates; +class InputGroupCall; -class inputGroupCall; +class Updates; class phone_leaveGroupCall final : public Function { std::int32_t get_id() const final { @@ -48841,10 +49334,10 @@ class phone_leaveGroupCall final : public Function { } public: - object_ptr call_; + object_ptr call_; int32 source_; - phone_leaveGroupCall(object_ptr &&call_, int32 source_); + phone_leaveGroupCall(object_ptr &&call_, int32 source_); static const std::int32_t ID = 1342404601; @@ -48859,9 +49352,9 @@ class phone_leaveGroupCall final : public Function { static ReturnType fetch_result(TlBufferParser &p); }; -class Updates; +class InputGroupCall; -class inputGroupCall; +class Updates; class phone_leaveGroupCallPresentation final : public Function { std::int32_t get_id() const final { @@ -48869,9 +49362,9 @@ class phone_leaveGroupCallPresentation final : public Function { } public: - object_ptr call_; + object_ptr call_; - explicit phone_leaveGroupCallPresentation(object_ptr &&call_); + explicit phone_leaveGroupCallPresentation(object_ptr &&call_); static const std::int32_t ID = 475058500; @@ -48913,8 +49406,6 @@ class phone_receivedCall final : public Function { class InputUser; -class inputGroupCall; - class phoneCallProtocol; class phone_phoneCall; @@ -48928,16 +49419,14 @@ class phone_requestCall final : public Function { int32 flags_; bool video_; object_ptr user_id_; - object_ptr conference_call_; int32 random_id_; bytes g_a_hash_; object_ptr protocol_; - enum Flags : std::int32_t { VIDEO_MASK = 1, CONFERENCE_CALL_MASK = 2 }; mutable int32 var0; - phone_requestCall(int32 flags_, bool video_, object_ptr &&user_id_, object_ptr &&conference_call_, int32 random_id_, bytes &&g_a_hash_, object_ptr &&protocol_); + phone_requestCall(int32 flags_, bool video_, object_ptr &&user_id_, int32 random_id_, bytes &&g_a_hash_, object_ptr &&protocol_); - static const std::int32_t ID = -1497079796; + static const std::int32_t ID = 1124046573; using ReturnType = object_ptr; @@ -49032,6 +49521,34 @@ class phone_saveDefaultGroupCallJoinAs final : public Function { static ReturnType fetch_result(TlBufferParser &p); }; +class InputGroupCall; + +class Updates; + +class phone_sendConferenceCallBroadcast final : public Function { + std::int32_t get_id() const final { + return ID; + } + + public: + object_ptr call_; + bytes block_; + + phone_sendConferenceCallBroadcast(object_ptr &&call_, bytes &&block_); + + static const std::int32_t ID = -965732096; + + using ReturnType = object_ptr; + + void store(TlStorerCalcLength &s) const final; + + void store(TlStorerUnsafe &s) const final; + + void store(TlStorerToString &s, const char *field_name) const final; + + static ReturnType fetch_result(TlBufferParser &p); +}; + class inputPhoneCall; class phone_sendSignalingData final : public Function { @@ -49073,7 +49590,6 @@ class phone_setCallRating final : public Function { object_ptr peer_; int32 rating_; string comment_; - enum Flags : std::int32_t { USER_INITIATIVE_MASK = 1 }; mutable int32 var0; phone_setCallRating(int32 flags_, bool user_initiative_, object_ptr &&peer_, int32 rating_, string const &comment_); @@ -49091,9 +49607,9 @@ class phone_setCallRating final : public Function { static ReturnType fetch_result(TlBufferParser &p); }; -class Updates; +class InputGroupCall; -class inputGroupCall; +class Updates; class phone_startScheduledGroupCall final : public Function { std::int32_t get_id() const final { @@ -49101,9 +49617,9 @@ class phone_startScheduledGroupCall final : public Function { } public: - object_ptr call_; + object_ptr call_; - explicit phone_startScheduledGroupCall(object_ptr &&call_); + explicit phone_startScheduledGroupCall(object_ptr &&call_); static const std::int32_t ID = 1451287362; @@ -49118,9 +49634,9 @@ class phone_startScheduledGroupCall final : public Function { static ReturnType fetch_result(TlBufferParser &p); }; -class Updates; +class InputGroupCall; -class inputGroupCall; +class Updates; class phone_toggleGroupCallRecord final : public Function { std::int32_t get_id() const final { @@ -49131,13 +49647,13 @@ class phone_toggleGroupCallRecord final : public Function { int32 flags_; bool start_; bool video_; - object_ptr call_; + object_ptr call_; string title_; bool video_portrait_; - enum Flags : std::int32_t { START_MASK = 1, VIDEO_MASK = 4, TITLE_MASK = 2, VIDEO_PORTRAIT_MASK = 4 }; + enum Flags : std::int32_t { TITLE_MASK = 2, VIDEO_PORTRAIT_MASK = 4 }; mutable int32 var0; - phone_toggleGroupCallRecord(int32 flags_, bool start_, bool video_, object_ptr &&call_, string const &title_, bool video_portrait_); + phone_toggleGroupCallRecord(int32 flags_, bool start_, bool video_, object_ptr &&call_, string const &title_, bool video_portrait_); static const std::int32_t ID = -248985848; @@ -49152,9 +49668,9 @@ class phone_toggleGroupCallRecord final : public Function { static ReturnType fetch_result(TlBufferParser &p); }; -class Updates; +class InputGroupCall; -class inputGroupCall; +class Updates; class phone_toggleGroupCallSettings final : public Function { std::int32_t get_id() const final { @@ -49164,12 +49680,12 @@ class phone_toggleGroupCallSettings final : public Function { public: int32 flags_; bool reset_invite_hash_; - object_ptr call_; + object_ptr call_; bool join_muted_; - enum Flags : std::int32_t { RESET_INVITE_HASH_MASK = 2, JOIN_MUTED_MASK = 1 }; + enum Flags : std::int32_t { JOIN_MUTED_MASK = 1 }; mutable int32 var0; - phone_toggleGroupCallSettings(int32 flags_, bool reset_invite_hash_, object_ptr &&call_, bool join_muted_); + phone_toggleGroupCallSettings(int32 flags_, bool reset_invite_hash_, object_ptr &&call_, bool join_muted_); static const std::int32_t ID = 1958458429; @@ -49184,9 +49700,9 @@ class phone_toggleGroupCallSettings final : public Function { static ReturnType fetch_result(TlBufferParser &p); }; -class Updates; +class InputGroupCall; -class inputGroupCall; +class Updates; class phone_toggleGroupCallStartSubscription final : public Function { std::int32_t get_id() const final { @@ -49194,10 +49710,10 @@ class phone_toggleGroupCallStartSubscription final : public Function { } public: - object_ptr call_; + object_ptr call_; bool subscribed_; - phone_toggleGroupCallStartSubscription(object_ptr &&call_, bool subscribed_); + phone_toggleGroupCallStartSubscription(object_ptr &&call_, bool subscribed_); static const std::int32_t ID = 563885286; @@ -49283,7 +49799,7 @@ class photos_updateProfilePhoto final : public Function { bool fallback_; object_ptr bot_; object_ptr id_; - enum Flags : std::int32_t { FALLBACK_MASK = 1, BOT_MASK = 2 }; + enum Flags : std::int32_t { BOT_MASK = 2 }; mutable int32 var0; photos_updateProfilePhoto(int32 flags_, bool fallback_, object_ptr &&bot_, object_ptr &&id_); @@ -49323,7 +49839,7 @@ class photos_uploadContactProfilePhoto final : public Function { object_ptr video_; double video_start_ts_; object_ptr video_emoji_markup_; - enum Flags : std::int32_t { SUGGEST_MASK = 8, SAVE_MASK = 16, FILE_MASK = 1, VIDEO_MASK = 2, VIDEO_START_TS_MASK = 4, VIDEO_EMOJI_MARKUP_MASK = 32 }; + enum Flags : std::int32_t { FILE_MASK = 1, VIDEO_MASK = 2, VIDEO_START_TS_MASK = 4, VIDEO_EMOJI_MARKUP_MASK = 32 }; mutable int32 var0; photos_uploadContactProfilePhoto(int32 flags_, bool suggest_, bool save_, object_ptr &&user_id_, object_ptr &&file_, object_ptr &&video_, double video_start_ts_, object_ptr &&video_emoji_markup_); @@ -49362,7 +49878,7 @@ class photos_uploadProfilePhoto final : public Function { object_ptr video_; double video_start_ts_; object_ptr video_emoji_markup_; - enum Flags : std::int32_t { FALLBACK_MASK = 8, BOT_MASK = 32, FILE_MASK = 1, VIDEO_MASK = 2, VIDEO_START_TS_MASK = 4, VIDEO_EMOJI_MARKUP_MASK = 16 }; + enum Flags : std::int32_t { BOT_MASK = 32, FILE_MASK = 1, VIDEO_MASK = 2, VIDEO_START_TS_MASK = 4, VIDEO_EMOJI_MARKUP_MASK = 16 }; mutable int32 var0; photos_uploadProfilePhoto(int32 flags_, bool fallback_, object_ptr &&bot_, object_ptr &&file_, object_ptr &&video_, double video_start_ts_, object_ptr &&video_emoji_markup_); @@ -49426,7 +49942,6 @@ class premium_getBoostsList final : public Function { object_ptr peer_; string offset_; int32 limit_; - enum Flags : std::int32_t { GIFTS_MASK = 1 }; mutable int32 var0; premium_getBoostsList(int32 flags_, bool gifts_, object_ptr &&peer_, string const &offset_, int32 limit_); @@ -49667,7 +50182,6 @@ class smsjobs_updateSettings final : public Function { public: int32 flags_; bool allow_international_; - enum Flags : std::int32_t { ALLOW_INTERNATIONAL_MASK = 1 }; mutable int32 var0; smsjobs_updateSettings(int32 flags_, bool allow_international_); @@ -49698,7 +50212,6 @@ class stats_getBroadcastRevenueStats final : public Function { int32 flags_; bool dark_; object_ptr peer_; - enum Flags : std::int32_t { DARK_MASK = 1 }; mutable int32 var0; stats_getBroadcastRevenueStats(int32 flags_, bool dark_, object_ptr &&peer_); @@ -49788,7 +50301,6 @@ class stats_getBroadcastStats final : public Function { int32 flags_; bool dark_; object_ptr channel_; - enum Flags : std::int32_t { DARK_MASK = 1 }; mutable int32 var0; stats_getBroadcastStats(int32 flags_, bool dark_, object_ptr &&channel_); @@ -49819,7 +50331,6 @@ class stats_getMegagroupStats final : public Function { int32 flags_; bool dark_; object_ptr channel_; - enum Flags : std::int32_t { DARK_MASK = 1 }; mutable int32 var0; stats_getMegagroupStats(int32 flags_, bool dark_, object_ptr &&channel_); @@ -49881,7 +50392,6 @@ class stats_getMessageStats final : public Function { bool dark_; object_ptr channel_; int32 msg_id_; - enum Flags : std::int32_t { DARK_MASK = 1 }; mutable int32 var0; stats_getMessageStats(int32 flags_, bool dark_, object_ptr &&channel_, int32 msg_id_); @@ -49943,7 +50453,6 @@ class stats_getStoryStats final : public Function { bool dark_; object_ptr peer_; int32 id_; - enum Flags : std::int32_t { DARK_MASK = 1 }; mutable int32 var0; stats_getStoryStats(int32 flags_, bool dark_, object_ptr &&peer_, int32 id_); @@ -50130,7 +50639,7 @@ class stickers_createStickerSet final : public Function { object_ptr thumb_; array> stickers_; string software_; - enum Flags : std::int32_t { MASKS_MASK = 1, EMOJIS_MASK = 32, TEXT_COLOR_MASK = 64, THUMB_MASK = 4, SOFTWARE_MASK = 8 }; + enum Flags : std::int32_t { THUMB_MASK = 4, SOFTWARE_MASK = 8 }; mutable int32 var0; stickers_createStickerSet(int32 flags_, bool masks_, bool emojis_, bool text_color_, object_ptr &&user_id_, string const &title_, string const &short_name_, object_ptr &&thumb_, array> &&stickers_, string const &software_); @@ -50328,7 +50837,6 @@ class stories_activateStealthMode final : public Function { int32 flags_; bool past_; bool future_; - enum Flags : std::int32_t { PAST_MASK = 1, FUTURE_MASK = 2 }; mutable int32 var0; stories_activateStealthMode(int32 flags_, bool past_, bool future_); @@ -50348,6 +50856,8 @@ class stories_activateStealthMode final : public Function { class InputPeer; +class stories_canSendStoryCount; + class stories_canSendStory final : public Function { std::int32_t get_id() const final { return ID; @@ -50358,9 +50868,9 @@ class stories_canSendStory final : public Function { explicit stories_canSendStory(object_ptr &&peer_); - static const std::int32_t ID = -941629475; + static const std::int32_t ID = 820732912; - using ReturnType = bool; + using ReturnType = object_ptr; void store(TlStorerCalcLength &s) const final; @@ -50503,7 +51013,7 @@ class stories_getAllStories final : public Function { bool next_; bool hidden_; string state_; - enum Flags : std::int32_t { NEXT_MASK = 2, HIDDEN_MASK = 4, STATE_MASK = 1 }; + enum Flags : std::int32_t { STATE_MASK = 1 }; mutable int32 var0; stories_getAllStories(int32 flags_, bool next_, bool hidden_, string const &state_); @@ -50728,7 +51238,7 @@ class stories_getStoryReactionsList final : public Function { object_ptr reaction_; string offset_; int32 limit_; - enum Flags : std::int32_t { FORWARDS_FIRST_MASK = 4, REACTION_MASK = 1, OFFSET_MASK = 2 }; + enum Flags : std::int32_t { REACTION_MASK = 1, OFFSET_MASK = 2 }; mutable int32 var0; stories_getStoryReactionsList(int32 flags_, bool forwards_first_, object_ptr &&peer_, int32 id_, object_ptr &&reaction_, string const &offset_, int32 limit_); @@ -50765,7 +51275,7 @@ class stories_getStoryViewsList final : public Function { int32 id_; string offset_; int32 limit_; - enum Flags : std::int32_t { JUST_CONTACTS_MASK = 1, REACTIONS_FIRST_MASK = 4, FORWARDS_FIRST_MASK = 8, Q_MASK = 2 }; + enum Flags : std::int32_t { Q_MASK = 2 }; mutable int32 var0; stories_getStoryViewsList(int32 flags_, bool just_contacts_, bool reactions_first_, bool forwards_first_, object_ptr &&peer_, string const &q_, int32 id_, string const &offset_, int32 limit_); @@ -50918,7 +51428,6 @@ class stories_sendReaction final : public Function { object_ptr peer_; int32 story_id_; object_ptr reaction_; - enum Flags : std::int32_t { ADD_TO_RECENT_MASK = 1 }; mutable int32 var0; stories_sendReaction(int32 flags_, bool add_to_recent_, object_ptr &&peer_, int32 story_id_, object_ptr &&reaction_); @@ -50968,7 +51477,7 @@ class stories_sendStory final : public Function { int32 period_; object_ptr fwd_from_id_; int32 fwd_from_story_; - enum Flags : std::int32_t { PINNED_MASK = 4, NOFORWARDS_MASK = 16, FWD_MODIFIED_MASK = 128, MEDIA_AREAS_MASK = 32, CAPTION_MASK = 1, ENTITIES_MASK = 2, PERIOD_MASK = 8, FWD_FROM_ID_MASK = 64, FWD_FROM_STORY_MASK = 64 }; + enum Flags : std::int32_t { MEDIA_AREAS_MASK = 32, CAPTION_MASK = 1, ENTITIES_MASK = 2, PERIOD_MASK = 8, FWD_FROM_ID_MASK = 64, FWD_FROM_STORY_MASK = 64 }; mutable int32 var0; stories_sendStory(int32 flags_, bool pinned_, bool noforwards_, bool fwd_modified_, object_ptr &&peer_, object_ptr &&media_, array> &&media_areas_, string const &caption_, array> &&entities_, array> &&privacy_rules_, int64 random_id_, int32 period_, object_ptr &&fwd_from_id_, int32 fwd_from_story_); @@ -51150,7 +51659,6 @@ class updates_getChannelDifference final : public Function { object_ptr filter_; int32 pts_; int32 limit_; - enum Flags : std::int32_t { FORCE_MASK = 1 }; mutable int32 var0; updates_getChannelDifference(int32 flags_, bool force_, object_ptr &&channel_, object_ptr &&filter_, int32 pts_, int32 limit_); @@ -51292,7 +51800,6 @@ class upload_getFile final : public Function { object_ptr location_; int64 offset_; int32 limit_; - enum Flags : std::int32_t { PRECISE_MASK = 1, CDN_SUPPORTED_MASK = 2 }; mutable int32 var0; upload_getFile(int32 flags_, bool precise_, bool cdn_supported_, object_ptr &&location_, int64 offset_, int32 limit_); diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/mtproto/AuthData.h b/third-party/td/TdBinding/SharedHeaders/td/td/mtproto/AuthData.h index d7458a6f4b..9b1fcf96ea 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/mtproto/AuthData.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/mtproto/AuthData.h @@ -67,16 +67,20 @@ class AuthData { void set_main_auth_key(AuthKey auth_key) { main_auth_key_ = std::move(auth_key); } + void break_main_auth_key() { main_auth_key_.break_key(); } + const AuthKey &get_main_auth_key() const { // CHECK(has_main_auth_key()); return main_auth_key_; } + bool has_main_auth_key() const { return !main_auth_key_.empty(); } + bool need_main_auth_key() const { return !has_main_auth_key(); } @@ -85,12 +89,15 @@ class AuthData { CHECK(!auth_key.empty()); tmp_auth_key_ = std::move(auth_key); } + const AuthKey &get_tmp_auth_key() const { return tmp_auth_key_; } + bool was_tmp_auth_key() const { return use_pfs() && !tmp_auth_key_.empty(); } + bool need_tmp_auth_key(double now, double refresh_margin) const { if (!use_pfs()) { return false; @@ -103,12 +110,15 @@ class AuthData { } return false; } + void drop_main_auth_key() { main_auth_key_ = AuthKey(); } + void drop_tmp_auth_key() { tmp_auth_key_ = AuthKey(); } + bool has_tmp_auth_key(double now) const { if (!use_pfs()) { return false; @@ -128,6 +138,7 @@ class AuthData { } return get_main_auth_key(); } + bool has_auth_key(double now) const { if (use_pfs()) { return has_tmp_auth_key(now); @@ -138,6 +149,7 @@ class AuthData { bool get_auth_flag() const { return main_auth_key_.auth_flag(); } + void set_auth_flag(bool auth_flag) { main_auth_key_.set_auth_flag(auth_flag); if (!auth_flag) { @@ -148,6 +160,7 @@ class AuthData { bool get_bind_flag() const { return !use_pfs() || tmp_auth_key_.auth_flag(); } + void on_bind() { CHECK(use_pfs()); tmp_auth_key_.set_auth_flag(true); @@ -184,6 +197,7 @@ class AuthData { void set_session_id(uint64 session_id) { session_id_ = session_id; } + uint64 get_session_id() const { CHECK(session_id_ != 0); return session_id_; diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/AuthManager.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/AuthManager.h index 5c38fe23f5..899d026e27 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/AuthManager.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/AuthManager.h @@ -90,7 +90,7 @@ class AuthManager final : public NetActor { tl_object_ptr get_current_authorization_state_object() const; private: - static constexpr size_t MAX_NAME_LENGTH = 64; // server side limit + static constexpr size_t MAX_NAME_LENGTH = 64; // server-side limit enum class State : int32 { None, diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/BotRecommendationManager.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/BotRecommendationManager.h index 814349c8d7..298a844bd5 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/BotRecommendationManager.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/BotRecommendationManager.h @@ -27,7 +27,7 @@ class BotRecommendationManager final : public Actor { void get_bot_recommendations(UserId bot_user_id, bool return_local, Promise> &&users_promise, - Promise> &&count_promise); + Promise &&count_promise); void open_bot_recommended_bot(UserId bot_user_id, UserId opened_bot_user_id, Promise &&promise); @@ -56,7 +56,7 @@ class BotRecommendationManager final : public Actor { void load_bot_recommendations(UserId bot_user_id, bool use_database, bool return_local, Promise> &&users_promise, - Promise> &&count_promise); + Promise &&count_promise); void fail_load_bot_recommendations_queries(UserId bot_user_id, Status &&error); @@ -74,8 +74,7 @@ class BotRecommendationManager final : public Actor { FlatHashMap bot_recommended_bots_; FlatHashMap>>, UserIdHash> get_bot_recommendations_queries_; - FlatHashMap>>, UserIdHash> - get_bot_recommendation_count_queries_[2]; + FlatHashMap>, UserIdHash> get_bot_recommendation_count_queries_[2]; }; } // namespace td diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/BusinessConnectionManager.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/BusinessConnectionManager.h index 093ad99bc1..0c34737697 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/BusinessConnectionManager.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/BusinessConnectionManager.h @@ -137,7 +137,7 @@ class BusinessConnectionManager final : public Actor { void get_current_state(vector> &updates) const; private: - static constexpr size_t MAX_NAME_LENGTH = 64; // server side limit for first/last name + static constexpr size_t MAX_NAME_LENGTH = 64; // server-side limit for first/last name struct BusinessConnection; struct PendingMessage; diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/CallActor.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/CallActor.h index 3a9a2e250b..8dbfe1bea1 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/CallActor.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/CallActor.h @@ -10,8 +10,6 @@ #include "td/telegram/CallId.h" #include "td/telegram/DhConfig.h" #include "td/telegram/files/FileUploadId.h" -#include "td/telegram/GroupCallId.h" -#include "td/telegram/InputGroupCallId.h" #include "td/telegram/net/NetQuery.h" #include "td/telegram/td_api.h" #include "td/telegram/telegram_api.h" @@ -92,6 +90,7 @@ struct CallState { vector emojis_fingerprint; string custom_parameters; bool allow_p2p{false}; + bool conference_supported{false}; Status error; @@ -102,8 +101,7 @@ class CallActor final : public NetQueryCallback { public: CallActor(Td *td, CallId call_id, ActorShared<> parent, Promise promise); - void create_call(UserId user_id, CallProtocol &&protocol, bool is_video, GroupCallId group_call_id, - Promise &&promise); + void create_call(UserId user_id, CallProtocol &&protocol, bool is_video, Promise &&promise); void accept_call(CallProtocol &&protocol, Promise promise); @@ -111,7 +109,8 @@ class CallActor final : public NetQueryCallback { void send_call_signaling_data(string &&data, Promise promise); - void discard_call(bool is_disconnected, int32 duration, bool is_video, int64 connection_id, Promise promise); + void discard_call(bool is_disconnected, const string &invite_link, int32 duration, bool is_video, int64 connection_id, + Promise promise); void rate_call(int32 rating, string comment, vector> &&problems, Promise promise); @@ -120,8 +119,6 @@ class CallActor final : public NetQueryCallback { void send_call_log(td_api::object_ptr log_file, Promise promise); - void create_conference_call(Promise promise); - void update_call(tl_object_ptr call); private: @@ -155,7 +152,6 @@ class CallActor final : public NetQueryCallback { bool is_outgoing_{false}; bool is_video_{false}; UserId user_id_; - InputGroupCallId input_group_call_id_; CallId local_call_id_; int64 call_id_{0}; @@ -172,8 +168,6 @@ class CallActor final : public NetQueryCallback { void update_call_inner(tl_object_ptr call); - void update_conference_call(const telegram_api::object_ptr &conference_call); - tl_object_ptr get_input_phone_call(const char *source); bool load_dh_config(); void on_dh_config(Result> r_dh_config, bool dummy); @@ -223,8 +217,6 @@ class CallActor final : public NetQueryCallback { void on_save_log_query_result(FileUploadId file_upload_id, Promise promise, Result r_net_query); - void on_create_conference_call_result(Promise promise, Result r_net_query); - void on_get_call_config_result(Result r_net_query); void flush_call_state(); diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/CallDiscardReason.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/CallDiscardReason.h index 329787a1bc..16d035aa6b 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/CallDiscardReason.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/CallDiscardReason.h @@ -14,9 +14,9 @@ namespace td { struct CallDiscardReason { - enum class Type : int32 { Empty, Missed, Disconnected, HungUp, Declined }; + enum class Type : int32 { Empty, Missed, Disconnected, HungUp, Declined, UpgradeToGroupCall }; Type type_ = Type::Empty; - string encrypted_key_; + string slug_; }; CallDiscardReason get_call_discard_reason(const telegram_api::object_ptr &reason); diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/CallManager.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/CallManager.h index e0fd07701c..af7d0accc0 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/CallManager.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/CallManager.h @@ -8,7 +8,6 @@ #include "td/telegram/CallActor.h" #include "td/telegram/CallId.h" -#include "td/telegram/GroupCallId.h" #include "td/telegram/td_api.h" #include "td/telegram/telegram_api.h" #include "td/telegram/UserId.h" @@ -30,21 +29,18 @@ class CallManager final : public Actor { public: CallManager(Td *td, ActorShared<> parent); - CallId get_call_id(int64 call_id); - void update_call(telegram_api::object_ptr call); void update_call_signaling_data(int64 call_id, string data); - void create_call(UserId user_id, CallProtocol &&protocol, bool is_video, GroupCallId group_call_id, - Promise promise); + void create_call(UserId user_id, CallProtocol &&protocol, bool is_video, Promise promise); void accept_call(CallId call_id, CallProtocol &&protocol, Promise promise); void send_call_signaling_data(CallId call_id, string &&data, Promise promise); - void discard_call(CallId call_id, bool is_disconnected, int32 duration, bool is_video, int64 connection_id, - Promise promise); + void discard_call(CallId call_id, bool is_disconnected, const string &invite_link, int32 duration, bool is_video, + int64 connection_id, Promise promise); void rate_call(CallId call_id, int32 rating, string comment, vector> &&problems, Promise promise); @@ -53,8 +49,6 @@ class CallManager final : public Actor { void send_call_log(CallId call_id, td_api::object_ptr log_file, Promise promise); - void create_conference_call(CallId call_id, Promise promise); - private: bool close_flag_ = false; diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/ChannelRecommendationManager.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/ChannelRecommendationManager.h index 4a572d5954..0d892da5ed 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/ChannelRecommendationManager.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/ChannelRecommendationManager.h @@ -32,7 +32,7 @@ class ChannelRecommendationManager final : public Actor { void get_channel_recommendations(DialogId dialog_id, bool return_local, Promise> &&chats_promise, - Promise> &&count_promise); + Promise &&count_promise); void open_channel_recommended_channel(DialogId dialog_id, DialogId opened_dialog_id, Promise &&promise); @@ -77,7 +77,7 @@ class ChannelRecommendationManager final : public Actor { void load_channel_recommendations(ChannelId channel_id, bool use_database, bool return_local, Promise> &&chats_promise, - Promise> &&count_promise); + Promise &&count_promise); void fail_load_channel_recommendations_queries(ChannelId channel_id, Status &&error); @@ -94,8 +94,7 @@ class ChannelRecommendationManager final : public Actor { FlatHashMap channel_recommended_dialogs_; FlatHashMap>>, ChannelIdHash> get_channel_recommendations_queries_; - FlatHashMap>>, ChannelIdHash> - get_channel_recommendation_count_queries_[2]; + FlatHashMap>, ChannelIdHash> get_channel_recommendation_count_queries_[2]; RecommendedDialogs recommended_channels_; vector>> get_recommended_channels_queries_; diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/ChatManager.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/ChatManager.h index 74b1f989d6..44e7d33ce1 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/ChatManager.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/ChatManager.h @@ -121,6 +121,8 @@ class ChatManager final : public Actor { bool get_channel_stories_hidden(ChannelId channel_id) const; + bool get_channel_autotranslation(ChannelId channel_id) const; + bool can_poll_channel_active_stories(ChannelId channel_id) const; bool can_use_premium_custom_emoji_in_channel(ChannelId channel_id) const; @@ -259,6 +261,9 @@ class ChatManager final : public Actor { void toggle_channel_can_have_sponsored_messages(ChannelId channel_id, bool can_have_sponsored_messages, Promise &&promise); + void toggle_channel_has_automatic_translation(ChannelId channel_id, bool has_automatic_translation, + Promise &&promise); + void toggle_channel_has_hidden_participants(ChannelId channel_id, bool has_hidden_participants, Promise &&promise); @@ -507,6 +512,7 @@ class ChatManager final : public Actor { bool join_to_send = false; bool join_request = false; bool stories_hidden = false; + bool autotranslation = false; bool is_megagroup = false; bool is_gigagroup = false; @@ -628,8 +634,8 @@ class ChatManager final : public Actor { class ChatLogEvent; class ChannelLogEvent; - static constexpr size_t MAX_TITLE_LENGTH = 128; // server side limit for chat title - static constexpr size_t MAX_DESCRIPTION_LENGTH = 255; // server side limit for chat/channel description + static constexpr size_t MAX_TITLE_LENGTH = 128; // server-side limit for chat title + static constexpr size_t MAX_DESCRIPTION_LENGTH = 255; // server-side limit for chat/channel description static constexpr int32 MAX_ACTIVE_STORY_ID_RELOAD_TIME = 3600; // some reasonable limit diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/CommonDialogManager.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/CommonDialogManager.h index 8dcd56fa37..e0b1405c5c 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/CommonDialogManager.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/CommonDialogManager.h @@ -42,7 +42,7 @@ class CommonDialogManager final : public Actor { private: void tear_down() final; - static constexpr int32 MAX_GET_DIALOGS = 100; // server side limit + static constexpr int32 MAX_GET_DIALOGS = 100; // server-side limit struct CommonDialogs { vector dialog_ids; diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/ConfigManager.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/ConfigManager.h index de1527a6e3..61aa91f278 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/ConfigManager.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/ConfigManager.h @@ -77,7 +77,7 @@ class ConfigManager final : public NetQueryCallback { private: struct AppConfig { - static constexpr int32 CURRENT_VERSION = 71; + static constexpr int32 CURRENT_VERSION = 77; int32 version_ = 0; int32 hash_ = 0; telegram_api::object_ptr config_; diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/DialogInviteLinkManager.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/DialogInviteLinkManager.h index f3a44f3997..0ef752b225 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/DialogInviteLinkManager.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/DialogInviteLinkManager.h @@ -87,7 +87,7 @@ class DialogInviteLinkManager final : public Actor { void delete_all_revoked_dialog_invite_links(DialogId dialog_id, UserId creator_user_id, Promise &&promise); private: - static constexpr size_t MAX_INVITE_LINK_TITLE_LENGTH = 32; // server side limit + static constexpr size_t MAX_INVITE_LINK_TITLE_LENGTH = 32; // server-side limit void tear_down() final; diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/DialogManager.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/DialogManager.h index af14ecb53a..03f95d8ce7 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/DialogManager.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/DialogManager.h @@ -252,7 +252,7 @@ class DialogManager final : public Actor { vector search_dialogs_on_server(const string &query, int32 limit, Promise &&promise); - void reload_voice_chat_on_search(const string &username); + void reload_video_chat_on_search(const string &username); void reget_peer_settings(DialogId dialog_id); @@ -377,7 +377,7 @@ class DialogManager final : public Actor { }; WaitFreeHashMap resolved_usernames_; WaitFreeHashMap inaccessible_resolved_usernames_; - FlatHashSet reload_voice_chat_on_search_usernames_; + FlatHashSet reload_video_chat_on_search_usernames_; FlatHashMap>> resolve_dialog_username_queries_; diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/DialogParticipantManager.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/DialogParticipantManager.h index ad8bc77c10..e731493438 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/DialogParticipantManager.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/DialogParticipantManager.h @@ -162,7 +162,7 @@ class DialogParticipantManager final : public Actor { static constexpr int32 CHANNEL_PARTICIPANT_CACHE_TIME = 1800; // some reasonable limit - static constexpr int32 MAX_GET_CHANNEL_PARTICIPANTS = 200; // server side limit + static constexpr int32 MAX_GET_CHANNEL_PARTICIPANTS = 200; // server-side limit void tear_down() final; diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/ForumTopicManager.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/ForumTopicManager.h index 7570376046..e83b5d7a1e 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/ForumTopicManager.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/ForumTopicManager.h @@ -116,7 +116,7 @@ class ForumTopicManager final : public Actor { void on_topic_message_count_changed(DialogId dialog_id, MessageId top_thread_message_id, int diff); private: - static constexpr size_t MAX_FORUM_TOPIC_TITLE_LENGTH = 128; // server side limit for forum topic title + static constexpr size_t MAX_FORUM_TOPIC_TITLE_LENGTH = 128; // server-side limit for forum topic title struct Topic { unique_ptr info_; diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/GroupCallJoinParameters.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/GroupCallJoinParameters.h new file mode 100644 index 0000000000..563bda666c --- /dev/null +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/GroupCallJoinParameters.h @@ -0,0 +1,30 @@ +// +// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2025 +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +#pragma once + +#include "td/telegram/td_api.h" + +#include "td/utils/common.h" +#include "td/utils/Status.h" + +namespace td { + +struct GroupCallJoinParameters { + string payload_; + int32 audio_source_ = 0; + bool is_muted_ = false; + bool is_my_video_enabled_ = false; + + static Result get_group_call_join_parameters( + td_api::object_ptr &¶meters, bool allow_empty); + + bool is_empty() const { + return payload_.empty(); + } +}; + +} // namespace td diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/GroupCallManager.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/GroupCallManager.h index efce0b9aab..3e2cba9f95 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/GroupCallManager.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/GroupCallManager.h @@ -11,7 +11,9 @@ #include "td/telegram/GroupCallId.h" #include "td/telegram/GroupCallParticipant.h" #include "td/telegram/GroupCallParticipantOrder.h" +#include "td/telegram/InputGroupCall.h" #include "td/telegram/InputGroupCallId.h" +#include "td/telegram/MessageFullId.h" #include "td/telegram/td_api.h" #include "td/telegram/telegram_api.h" #include "td/telegram/UserId.h" @@ -19,6 +21,8 @@ #include "td/actor/actor.h" #include "td/actor/MultiTimeout.h" +#include "td/e2e/e2e_api.h" + #include "td/utils/common.h" #include "td/utils/FlatHashMap.h" #include "td/utils/Promise.h" @@ -28,6 +32,7 @@ namespace td { +struct GroupCallJoinParameters; class Td; class GroupCallManager final : public Actor { @@ -51,10 +56,13 @@ class GroupCallManager final : public Actor { void set_group_call_default_join_as(DialogId dialog_id, DialogId as_dialog_id, Promise &&promise); - void create_voice_chat(DialogId dialog_id, string title, int32 start_date, bool is_rtmp_stream, + void create_video_chat(DialogId dialog_id, string title, int32 start_date, bool is_rtmp_stream, Promise &&promise); - void get_voice_chat_rtmp_stream_url(DialogId dialog_id, bool revoke, + void create_group_call(td_api::object_ptr &&join_parameters, + Promise> &&promise); + + void get_video_chat_rtmp_stream_url(DialogId dialog_id, bool revoke, Promise> &&promise); void get_group_call(GroupCallId group_call_id, Promise> &&promise); @@ -65,7 +73,7 @@ class GroupCallManager final : public Actor { Promise> &&promise); void get_group_call_streams(GroupCallId group_call_id, - Promise> &&promise); + Promise> &&promise); void get_group_call_stream_segment(GroupCallId group_call_id, int64 time_offset, int32 scale, int32 channel_id, td_api::object_ptr quality, @@ -73,10 +81,22 @@ class GroupCallManager final : public Actor { void start_scheduled_group_call(GroupCallId group_call_id, Promise &&promise); - void join_group_call(GroupCallId group_call_id, DialogId as_dialog_id, int32 audio_source, string &&payload, - bool is_muted, bool is_my_video_enabled, const string &invite_hash, int64 key_fingerprint, + void join_group_call(td_api::object_ptr &&api_input_group_call, + td_api::object_ptr &&join_parameters, + Promise> &&promise); + + void join_video_chat(GroupCallId group_call_id, DialogId as_dialog_id, + td_api::object_ptr &&join_parameters, const string &invite_hash, Promise &&promise); + void encrypt_group_call_data(GroupCallId group_call_id, + td_api::object_ptr &&data_channel, string &&data, + int32 unencrypted_prefix_size, Promise &&promise); + + void decrypt_group_call_data(GroupCallId group_call_id, DialogId participant_dialog_id, + td_api::object_ptr &&data_channel, string &&data, + Promise &&promise); + void start_group_call_screen_sharing(GroupCallId group_call_id, int32 audio_source, string &&payload, Promise &&promise); @@ -100,6 +120,17 @@ class GroupCallManager final : public Actor { void revoke_group_call_invite_link(GroupCallId group_call_id, Promise &&promise); + void invite_group_call_participant(GroupCallId group_call_id, UserId user_id, bool is_video, + Promise> &&promise); + + void decline_group_call_invitation(MessageFullId message_full_id, Promise &&promise); + + void delete_group_call_participants(GroupCallId group_call_id, const vector &user_ids, bool is_ban, + Promise &&promise); + + void do_delete_group_call_participants(InputGroupCallId input_group_call_id, vector user_ids, bool is_ban, + Promise &&promise); + void invite_group_call_participants(GroupCallId group_call_id, vector &&user_ids, Promise &&promise); void get_group_call_invite_link(GroupCallId group_call_id, bool can_self_unmute, Promise &&promise); @@ -119,6 +150,9 @@ class GroupCallManager final : public Actor { void toggle_group_call_participant_is_hand_raised(GroupCallId group_call_id, DialogId dialog_id, bool is_hand_raised, Promise &&promise); + void get_group_call_participants(td_api::object_ptr input_group_call, int32 limit, + Promise> &&promise); + void load_group_call_participants(GroupCallId group_call_id, int32 limit, Promise &&promise); void leave_group_call(GroupCallId group_call_id, Promise &&promise); @@ -129,6 +163,9 @@ class GroupCallManager final : public Actor { void on_update_group_call_connection(string &&connection_params); + void on_update_group_call_chain_blocks(InputGroupCallId input_group_call_id, int32 sub_chain_id, + vector &&blocks, int32 next_offset); + void on_update_group_call(tl_object_ptr group_call_ptr, DialogId dialog_id); void on_user_speaking_in_group_call(GroupCallId group_call_id, DialogId dialog_id, bool is_muted_by_admin, int32 date, @@ -142,22 +179,29 @@ class GroupCallManager final : public Actor { vector> &&participants, int32 version, bool is_recursive = false); - void process_join_group_call_response(InputGroupCallId input_group_call_id, uint64 generation, + void process_join_video_chat_response(InputGroupCallId input_group_call_id, uint64 generation, tl_object_ptr &&updates, Promise &&promise); void process_join_group_call_presentation_response(InputGroupCallId input_group_call_id, uint64 generation, tl_object_ptr &&updates, Status status); + void register_group_call(MessageFullId message_full_id, const char *source); + + void unregister_group_call(MessageFullId message_full_id, const char *source); + private: struct GroupCall; struct GroupCallParticipants; struct GroupCallRecentSpeakers; struct PendingJoinRequest; + struct PendingJoinPresentationRequest; static constexpr int32 RECENT_SPEAKER_TIMEOUT = 60 * 60; static constexpr int32 UPDATE_GROUP_CALL_PARTICIPANT_ORDER_TIMEOUT = 10; static constexpr int32 CHECK_GROUP_CALL_IS_JOINED_TIMEOUT = 10; - static constexpr size_t MAX_TITLE_LENGTH = 64; // server side limit for group call/call record title length + static constexpr int32 GROUP_CALL_BLOCK_POLL_TIMEOUT = 10; + static constexpr size_t MAX_TITLE_LENGTH = 64; // server-side limit for group call/call record title length + static constexpr size_t BLOCK_POLL_COUNT = 100; void tear_down() final; @@ -182,6 +226,16 @@ class GroupCallManager final : public Actor { void on_sync_participants_timeout(GroupCallId group_call_id); + static void on_update_group_call_timeout_callback(void *group_call_manager_ptr, int64 call_id); + + void on_update_group_call_timeout(int64 call_id); + + static void on_poll_group_call_blocks_timeout_callback(void *group_call_manager_ptr, int64 call_id); + + void on_poll_group_call_blocks_timeout(int64 call_id); + + void on_update_group_call_message(int64 call_id); + GroupCallId get_next_group_call_id(InputGroupCallId input_group_call_id); GroupCall *add_group_call(InputGroupCallId input_group_call_id, DialogId dialog_id); @@ -193,20 +247,22 @@ class GroupCallManager final : public Actor { Status can_manage_group_calls(DialogId dialog_id) const; - bool can_manage_group_call(InputGroupCallId input_group_call_id) const; + bool can_manage_group_call(InputGroupCallId input_group_call_id, bool allow_owned) const; + + bool can_manage_group_call(const GroupCall *group_call, bool allow_owned) const; bool get_group_call_can_self_unmute(InputGroupCallId input_group_call_id) const; bool get_group_call_joined_date_asc(InputGroupCallId input_group_call_id) const; - void on_voice_chat_created(DialogId dialog_id, InputGroupCallId input_group_call_id, Promise &&promise); + void on_video_chat_created(DialogId dialog_id, InputGroupCallId input_group_call_id, Promise &&promise); void finish_get_group_call(InputGroupCallId input_group_call_id, Result> &&result); void finish_get_group_call_streams(InputGroupCallId input_group_call_id, int32 audio_source, - Result> &&result, - Promise> &&promise); + Result> &&result, + Promise> &&promise); void finish_get_group_call_stream_segment(InputGroupCallId input_group_call_id, int32 audio_source, Result &&result, Promise &&promise); @@ -214,6 +270,13 @@ class GroupCallManager final : public Actor { void finish_check_group_call_is_joined(InputGroupCallId input_group_call_id, int32 audio_source, Result &&result); + void sync_conference_call_participants(InputGroupCallId input_group_call_id, + vector &&blockchain_participant_ids); + + void on_sync_conference_call_participants(InputGroupCallId input_group_call_id, + vector &&blockchain_participant_ids, + vector &&server_participant_ids); + static const string &get_group_call_title(const GroupCall *group_call); static bool get_group_call_is_joined(const GroupCall *group_call); @@ -240,18 +303,26 @@ class GroupCallManager final : public Actor { bool need_group_call_participants(InputGroupCallId input_group_call_id) const; - static bool need_group_call_participants(const GroupCall *group_call); + bool need_group_call_participants(InputGroupCallId input_group_call_id, const GroupCall *group_call) const; bool process_pending_group_call_participant_updates(InputGroupCallId input_group_call_id); bool is_my_audio_source(InputGroupCallId input_group_call_id, const GroupCall *group_call, int32 audio_source) const; + void on_create_group_call(int32 random_id, Result> &&r_updates, + Promise> &&promise); + + void on_get_group_call_join_payload(InputGroupCallId input_group_call_id, string &&payload); + + void on_create_group_call_finished(InputGroupCallId input_group_call_id, bool is_join, + Promise> &&promise); + void sync_group_call_participants(InputGroupCallId input_group_call_id); void on_sync_group_call_participants(InputGroupCallId input_group_call_id, Result> &&result); - static GroupCallParticipantOrder get_real_participant_order(bool can_self_unmute, + static GroupCallParticipantOrder get_real_participant_order(bool my_can_self_unmute, const GroupCallParticipant &participant, const GroupCallParticipants *participants); @@ -262,12 +333,12 @@ class GroupCallManager final : public Actor { int32 version, const string &offset, bool is_load, bool is_sync); static bool update_group_call_participant_can_be_muted(bool can_manage, const GroupCallParticipants *participants, - GroupCallParticipant &participant); + GroupCallParticipant &participant, bool force_is_admin); void update_group_call_participants_can_be_muted(InputGroupCallId input_group_call_id, bool can_manage, - GroupCallParticipants *participants); + GroupCallParticipants *participants, bool force_is_admin); - void update_group_call_participants_order(InputGroupCallId input_group_call_id, bool can_self_unmute, + void update_group_call_participants_order(InputGroupCallId input_group_call_id, bool my_can_self_unmute, GroupCallParticipants *participants, const char *source); // returns participant_count_diff and video_participant_count_diff @@ -282,6 +353,24 @@ class GroupCallManager final : public Actor { void finish_load_group_call_administrators(InputGroupCallId input_group_call_id, Result &&result); + void try_join_group_call(InputGroupCall &&input_group_call, GroupCallJoinParameters &&join_parameters, + Promise> &&promise); + + void do_join_group_call(InputGroupCall &&input_group_call, GroupCallJoinParameters &&join_parameters, + telegram_api::object_ptr updates, + Promise> &&promise); + + void on_join_group_call(InputGroupCall &&input_group_call, GroupCallJoinParameters &&join_parameters, + const tde2e_api::PrivateKeyId &private_key_id, const tde2e_api::PublicKeyId &public_key_id, + Result> &&r_updates, + Promise> &&promise); + + void process_join_group_call_response(InputGroupCallId input_group_call_id, bool is_join, int32 audio_source, + const tde2e_api::PrivateKeyId &private_key_id, + const tde2e_api::PublicKeyId &public_key_id, + telegram_api::object_ptr &&updates, + Promise> &&promise); + int32 cancel_join_group_call_request(InputGroupCallId input_group_call_id, GroupCall *group_call); int32 cancel_join_group_call_presentation_request(InputGroupCallId input_group_call_id); @@ -375,6 +464,20 @@ class GroupCallManager final : public Actor { void update_group_call_dialog(const GroupCall *group_call, const char *source, bool force); + void on_call_state_updated(GroupCall *group_call, const char *source); + + void set_blockchain_participant_ids(GroupCall *group_call, vector participant_ids); + + static vector get_emojis_fingerprint(const GroupCall *group_call); + + void on_call_verification_state_updated(GroupCall *group_call); + + void send_outbound_group_call_blockchain_messages(GroupCall *group_call); + + void poll_group_call_blocks(GroupCall *group_call, int32 sub_chain_id); + + void on_poll_group_call_blocks(InputGroupCallId input_group_call_id, int32 sub_chain_id); + vector> get_recent_speakers(const GroupCall *group_call, bool for_update); @@ -404,8 +507,26 @@ class GroupCallManager final : public Actor { FlatHashMap, InputGroupCallIdHash> group_calls_; + struct BeingCreatedCall { + bool is_join_ = false; + tde2e_api::PrivateKeyId private_key_id_{}; + tde2e_api::PublicKeyId public_key_id_{}; + int32 audio_source_ = 0; + }; + FlatHashMap being_created_group_calls_; + FlatHashMap group_call_join_payloads_; + + struct BeingJoinedCallBlocks { + bool is_inited_[2]; + vector blocks_[2]; + int32 next_offset_[2]; + }; + FlatHashMap being_joined_call_blocks_; + string pending_group_call_join_params_; + FlatHashMap real_input_group_call_ids_; + FlatHashMap, InputGroupCallIdHash> group_call_participants_; FlatHashMap, DialogIdHash> participant_id_to_group_call_id_; @@ -415,10 +536,14 @@ class GroupCallManager final : public Actor { load_group_call_queries_; FlatHashMap, InputGroupCallIdHash> pending_join_requests_; - FlatHashMap, InputGroupCallIdHash> + FlatHashMap, InputGroupCallIdHash> pending_join_presentation_requests_; uint64 join_group_request_generation_ = 0; + FlatHashMap group_call_messages_; + FlatHashMap group_call_message_full_ids_; + int64 current_call_id_ = 0; + uint64 toggle_recording_generation_ = 0; uint64 toggle_is_muted_generation_ = 0; @@ -432,6 +557,8 @@ class GroupCallManager final : public Actor { MultiTimeout pending_send_speaking_action_timeout_{"PendingSendSpeakingActionTimeout"}; MultiTimeout recent_speaker_update_timeout_{"RecentSpeakerUpdateTimeout"}; MultiTimeout sync_participants_timeout_{"SyncParticipantsTimeout"}; + MultiTimeout update_group_call_timeout_{"UpdateGroupCallTimeout"}; + MultiTimeout poll_group_call_blocks_timeout_{"PollGroupCallBlocksTimeout"}; }; } // namespace td diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/GroupCallParticipant.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/GroupCallParticipant.h index 8e1e7aa11c..2464bd21b3 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/GroupCallParticipant.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/GroupCallParticipant.h @@ -78,9 +78,9 @@ struct GroupCallParticipant { bool set_pending_is_muted(bool is_muted, bool can_manage, bool is_admin); - GroupCallParticipantOrder get_real_order(bool can_self_unmute, bool joined_date_asc) const; + GroupCallParticipantOrder get_real_order(bool my_can_self_unmute, bool joined_date_asc) const; - GroupCallParticipantOrder get_server_order(bool can_self_unmute, bool joined_date_asc) const; + GroupCallParticipantOrder get_server_order(bool my_can_self_unmute, bool joined_date_asc) const; bool is_valid() const { return dialog_id.is_valid(); diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/InlineQueriesManager.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/InlineQueriesManager.h index a8734d9428..0911d20798 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/InlineQueriesManager.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/InlineQueriesManager.h @@ -95,7 +95,7 @@ class InlineQueriesManager final : public Actor { private: static constexpr size_t MAX_RECENT_INLINE_BOTS = 20; // some reasonable value - static constexpr int32 INLINE_QUERY_DELAY_MS = 400; // server side limit + static constexpr int32 INLINE_QUERY_DELAY_MS = 400; // server-side limit Result> get_input_bot_inline_result( td_api::object_ptr &&result, bool *is_gallery, bool *force_vertical) const; diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/InputGroupCall.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/InputGroupCall.h new file mode 100644 index 0000000000..8af8ab0539 --- /dev/null +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/InputGroupCall.h @@ -0,0 +1,54 @@ +// +// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2025 +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +#pragma once + +#include "td/telegram/ServerMessageId.h" +#include "td/telegram/td_api.h" +#include "td/telegram/telegram_api.h" + +#include "td/utils/common.h" +#include "td/utils/HashTableUtils.h" +#include "td/utils/Status.h" +#include "td/utils/StringBuilder.h" + +namespace td { + +class Td; + +class InputGroupCall { + string slug_; + + ServerMessageId server_message_id_; + + public: + static Result get_input_group_call(Td *td, + td_api::object_ptr &&input_group_call); + + bool operator==(const InputGroupCall &other) const { + return slug_ == other.slug_ && server_message_id_ == other.server_message_id_; + } + + bool operator!=(const InputGroupCall &other) const { + return !(*this == other); + } + + uint32 get_hash() const { + return slug_.empty() ? server_message_id_.get() : Hash()(slug_); + } + + telegram_api::object_ptr get_input_group_call() const; + + friend StringBuilder &operator<<(StringBuilder &string_builder, InputGroupCall input_group_call); +}; + +struct InputGroupCallHash { + uint32 operator()(InputGroupCall input_group_call) const { + return input_group_call.get_hash(); + } +}; + +} // namespace td diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/InputGroupCallId.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/InputGroupCallId.h index a1be1617c0..1913bfe06e 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/InputGroupCallId.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/InputGroupCallId.h @@ -21,7 +21,7 @@ class InputGroupCallId { public: InputGroupCallId() = default; - explicit InputGroupCallId(const tl_object_ptr &input_group_call); + explicit InputGroupCallId(const telegram_api::object_ptr &input_group_call); InputGroupCallId(int64 group_call_id, int64 access_hash) : group_call_id(group_call_id), access_hash(access_hash) { } @@ -46,7 +46,7 @@ class InputGroupCallId { return Hash()(group_call_id); } - tl_object_ptr get_input_group_call() const; + telegram_api::object_ptr get_input_group_call() const; template void store(StorerT &storer) const { diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/LinkManager.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/LinkManager.h index f9222142c9..55d234da35 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/LinkManager.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/LinkManager.h @@ -96,6 +96,10 @@ class LinkManager final : public Actor { static string get_dialog_invite_link(Slice invite_hash, bool is_internal); + static string get_group_call_invite_link_slug(Slice invite_link); + + static string get_group_call_invite_link(Slice slug, bool is_internal); + static string get_instant_view_link_url(Slice link); static string get_instant_view_link_rhash(Slice link); @@ -140,6 +144,7 @@ class LinkManager final : public Actor { class InternalLinkDialogReferralProgram; class InternalLinkEditProfileSettings; class InternalLinkGame; + class InternalLinkGroupCall; class InternalLinkInstantView; class InternalLinkInvoice; class InternalLinkLanguage; @@ -147,6 +152,7 @@ class LinkManager final : public Actor { class InternalLinkMainWebApp; class InternalLinkMessage; class InternalLinkMessageDraft; + class InternalLinkMyStars; class InternalLinkPassportDataRequest; class InternalLinkPremiumFeatures; class InternalLinkPremiumGift; @@ -166,7 +172,7 @@ class LinkManager final : public Actor { class InternalLinkUpgradedGift; class InternalLinkUserPhoneNumber; class InternalLinkUserToken; - class InternalLinkVoiceChat; + class InternalLinkVideoChat; class InternalLinkWebApp; enum class LinkType : int32 { External, TMe, Tg, Telegraph }; diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/MessageContent.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/MessageContent.h index fe3ac2e038..146ed6e8d7 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/MessageContent.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/MessageContent.h @@ -326,6 +326,8 @@ bool update_message_content_extended_media( bool need_poll_message_content_extended_media(const MessageContent *content); +bool need_poll_conference_call_message_content(const MessageContent *content); + void set_message_content_video_start_timestamp(MessageContent *content, int32 start_timestamp); void get_message_content_animated_emoji_click_sticker(const MessageContent *content, MessageFullId message_full_id, diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/MessageContentType.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/MessageContentType.h index 809a0d59bb..1aaa56fe86 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/MessageContentType.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/MessageContentType.h @@ -88,7 +88,8 @@ enum class MessageContentType : int32 { StarGift, StarGiftUnique, PaidMessagesRefunded, - PaidMessagesPrice + PaidMessagesPrice, + ConferenceCall }; // increase MessageUnsupported::CURRENT_VERSION each time a new message content type is added diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/MessagesManager.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/MessagesManager.h index 8b13dd1837..7b57b2017d 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/MessagesManager.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/MessagesManager.h @@ -126,14 +126,15 @@ class MessagesManager final : public Actor { static constexpr int32 SEND_MESSAGE_FLAG_DISABLE_WEB_PAGE_PREVIEW = 1 << 1; static constexpr int32 SEND_MESSAGE_FLAG_HAS_REPLY_MARKUP = 1 << 2; static constexpr int32 SEND_MESSAGE_FLAG_HAS_ENTITIES = 1 << 3; - // static constexpr int32 SEND_MESSAGE_FLAG_IS_POST = 1 << 4; static constexpr int32 SEND_MESSAGE_FLAG_DISABLE_NOTIFICATION = 1 << 5; static constexpr int32 SEND_MESSAGE_FLAG_FROM_BACKGROUND = 1 << 6; static constexpr int32 SEND_MESSAGE_FLAG_CLEAR_DRAFT = 1 << 7; static constexpr int32 SEND_MESSAGE_FLAG_WITH_MY_SCORE = 1 << 8; static constexpr int32 SEND_MESSAGE_FLAG_IS_FROM_THREAD = 1 << 9; static constexpr int32 SEND_MESSAGE_FLAG_HAS_SCHEDULE_DATE = 1 << 10; - static constexpr int32 SEND_MESSAGE_FLAG_HAS_MESSAGE = 1 << 11; + static constexpr int32 SEND_MESSAGE_FLAG_HIDE_VIA = 1 << 11; + static constexpr int32 SEND_MESSAGE_FLAG_DROP_AUTHOR = 1 << 11; + static constexpr int32 SEND_MESSAGE_FLAG_DROP_MEDIA_CAPTIONS = 1 << 12; static constexpr int32 SEND_MESSAGE_FLAG_HAS_SEND_AS = 1 << 13; static constexpr int32 SEND_MESSAGE_FLAG_NOFORWARDS = 1 << 14; static constexpr int32 SEND_MESSAGE_FLAG_UPDATE_STICKER_SETS_ORDER = 1 << 15; @@ -246,9 +247,9 @@ class MessagesManager final : public Actor { int32 total_count, vector> &&messages, Promise &&promise); - bool on_update_message_id(int64 random_id, MessageId new_message_id, const char *source); + void wait_message_add(MessageFullId message_full_id, Promise &&promise); - void on_update_message_video_published(MessageFullId message_full_id); + bool on_update_message_id(int64 random_id, MessageId new_message_id, const char *source); void on_update_dialog_draft_message(DialogId dialog_id, MessageId top_thread_message_id, tl_object_ptr &&draft_message, bool force = false); @@ -920,6 +921,8 @@ class MessagesManager final : public Actor { int64 get_message_random_id(MessageFullId message_full_id); + bool need_poll_group_call_message(MessageFullId message_full_id); + void finish_gift_upgrade(MessageFullId message_full_id, Promise> &&promise); @@ -931,6 +934,8 @@ class MessagesManager final : public Actor { }; Result get_invoice_message_info(MessageFullId message_full_id); + Result get_group_call_message_id(MessageFullId message_full_id); + Result get_payment_successful_message_id(MessageFullId message_full_id); Result get_giveaway_message_id(MessageFullId message_full_id); @@ -1556,13 +1561,13 @@ class MessagesManager final : public Actor { class SetDialogFolderIdOnServerLogEvent; class UpdateDialogNotificationSettingsOnServerLogEvent; - static constexpr size_t MAX_GROUPED_MESSAGES = 10; // server side limit - static constexpr int32 MAX_GET_DIALOGS = 100; // server side limit - static constexpr int32 MAX_GET_HISTORY = 100; // server side limit - static constexpr int32 MAX_SEARCH_MESSAGES = 100; // server side limit + static constexpr size_t MAX_GROUPED_MESSAGES = 10; // server-side limit + static constexpr int32 MAX_GET_DIALOGS = 100; // server-side limit + static constexpr int32 MAX_GET_HISTORY = 100; // server-side limit + static constexpr int32 MAX_SEARCH_MESSAGES = 100; // server-side limit static constexpr int32 MIN_CHANNEL_DIFFERENCE = 1; static constexpr int32 MAX_CHANNEL_DIFFERENCE = 100; - static constexpr int32 MAX_BOT_CHANNEL_DIFFERENCE = 100000; // server side limit + static constexpr int32 MAX_BOT_CHANNEL_DIFFERENCE = 100000; // server-side limit static constexpr size_t MIN_DELETED_ASYNCHRONOUSLY_MESSAGES = 2; static constexpr size_t MAX_UNLOADED_MESSAGES = 5000; @@ -1994,8 +1999,12 @@ class MessagesManager final : public Actor { bool update_message_fact_check(const Dialog *d, Message *m, unique_ptr &&fact_check, bool need_save); + void on_unread_message_mention_removed(Dialog *d, const Message *m, const char *source); + bool update_message_contains_unread_mention(Dialog *d, Message *m, bool contains_unread_mention, const char *source); + void on_unread_message_reaction_removed(Dialog *d, const Message *m, const char *source); + bool remove_message_unread_reactions(Dialog *d, Message *m, const char *source); void read_message_content_from_updates(MessageId message_id, int32 read_date); @@ -2287,8 +2296,6 @@ class MessagesManager final : public Actor { void send_update_message_send_succeeded(Dialog *d, MessageId old_message_id, const Message *m, bool *need_update_dialog_pos); - void send_update_video_published(MessageFullId message_full_id); - void send_update_message_content(const Dialog *d, Message *m, bool is_message_in_dialog, const char *source); void send_update_message_content_impl(DialogId dialog_id, const Message *m, const char *source) const; @@ -3122,7 +3129,7 @@ class MessagesManager final : public Actor { update_scheduled_message_ids_; // new_message_id -> temporary_id FlatHashMap messages_to_restore_; // new_message_id -> temporary_id - FlatHashSet published_video_message_full_ids_; + FlatHashMap>, MessageFullIdHash> awaited_message_full_ids_; const char *debug_add_message_to_dialog_fail_reason_ = ""; diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/OrderInfo.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/OrderInfo.h index 862d13c002..dd948d6113 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/OrderInfo.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/OrderInfo.h @@ -75,7 +75,7 @@ bool operator!=(const OrderInfo &lhs, const OrderInfo &rhs); StringBuilder &operator<<(StringBuilder &string_builder, const OrderInfo &order_info); -unique_ptr get_order_info(tl_object_ptr order_info); +unique_ptr get_order_info(telegram_api::object_ptr order_info); tl_object_ptr get_order_info_object(const unique_ptr &order_info); diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/PollManager.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/PollManager.h index cf0cb328e1..cf61cd6bde 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/PollManager.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/PollManager.h @@ -144,7 +144,7 @@ class PollManager final : public Actor { bool was_invalidated_ = false; // the list needs to be invalidated when voters are changed }; - static constexpr int32 MAX_GET_POLL_VOTERS = 50; // server side limit + static constexpr int32 MAX_GET_POLL_VOTERS = 50; // server-side limit static constexpr int32 UNLOAD_POLL_DELAY = 600; // some reasonable value class SetPollAnswerLogEvent; diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/QuickReplyManager.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/QuickReplyManager.h index 799db49633..3b9673a537 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/QuickReplyManager.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/QuickReplyManager.h @@ -110,7 +110,7 @@ class QuickReplyManager final : public Actor { void get_current_state(vector> &updates) const; private: - static constexpr size_t MAX_GROUPED_MESSAGES = 10; // server side limit + static constexpr size_t MAX_GROUPED_MESSAGES = 10; // server-side limit struct QuickReplyMessage { QuickReplyMessage() = default; diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/Requests.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/Requests.h index ab24df836d..bfd1fabdee 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/Requests.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/Requests.h @@ -94,8 +94,12 @@ class Requests { Promise create_text_request_promise(uint64 id); + Promise create_data_request_promise(uint64 id); + Promise create_http_url_request_promise(uint64 id); + Promise create_count_request_promise(uint64 id); + template void on_request(uint64 id, const T &) = delete; @@ -627,11 +631,11 @@ class Requests { void on_request(uint64 id, const td_api::getStory &request); - void on_request(uint64 id, const td_api::getChatsToSendStories &request); + void on_request(uint64 id, const td_api::getChatsToPostStories &request); - void on_request(uint64 id, const td_api::canSendStory &request); + void on_request(uint64 id, const td_api::canPostStory &request); - void on_request(uint64 id, td_api::sendStory &request); + void on_request(uint64 id, td_api::postStory &request); void on_request(uint64 id, td_api::editStory &request); @@ -711,7 +715,7 @@ class Requests { void on_request(uint64 id, td_api::sendCallSignalingData &request); - void on_request(uint64 id, const td_api::discardCall &request); + void on_request(uint64 id, td_api::discardCall &request); void on_request(uint64 id, td_api::sendCallRating &request); @@ -725,7 +729,7 @@ class Requests { void on_request(uint64 id, td_api::createVideoChat &request); - void on_request(uint64 id, const td_api::createGroupCall &request); + void on_request(uint64 id, td_api::createGroupCall &request); void on_request(uint64 id, const td_api::getVideoChatRtmpUrl &request); @@ -733,25 +737,33 @@ class Requests { void on_request(uint64 id, const td_api::getGroupCall &request); - void on_request(uint64 id, const td_api::startScheduledGroupCall &request); + void on_request(uint64 id, const td_api::startScheduledVideoChat &request); - void on_request(uint64 id, const td_api::toggleGroupCallEnabledStartNotification &request); + void on_request(uint64 id, const td_api::toggleVideoChatEnabledStartNotification &request); void on_request(uint64 id, td_api::joinGroupCall &request); + void on_request(uint64 id, td_api::joinVideoChat &request); + void on_request(uint64 id, td_api::startGroupCallScreenSharing &request); void on_request(uint64 id, const td_api::endGroupCallScreenSharing &request); - void on_request(uint64 id, td_api::setGroupCallTitle &request); + void on_request(uint64 id, td_api::setVideoChatTitle &request); - void on_request(uint64 id, const td_api::toggleGroupCallMuteNewParticipants &request); + void on_request(uint64 id, const td_api::toggleVideoChatMuteNewParticipants &request); void on_request(uint64 id, const td_api::revokeGroupCallInviteLink &request); - void on_request(uint64 id, const td_api::inviteGroupCallParticipants &request); + void on_request(uint64 id, const td_api::inviteGroupCallParticipant &request); - void on_request(uint64 id, const td_api::getGroupCallInviteLink &request); + void on_request(uint64 id, const td_api::declineGroupCallInvitation &request); + + void on_request(uint64 id, const td_api::banGroupCallParticipants &request); + + void on_request(uint64 id, const td_api::inviteVideoChatParticipants &request); + + void on_request(uint64 id, const td_api::getVideoChatInviteLink &request); void on_request(uint64 id, td_api::startGroupCallRecording &request); @@ -771,15 +783,21 @@ class Requests { void on_request(uint64 id, const td_api::toggleGroupCallParticipantIsHandRaised &request); + void on_request(uint64 id, td_api::getGroupCallParticipants &request); + void on_request(uint64 id, const td_api::loadGroupCallParticipants &request); void on_request(uint64 id, const td_api::leaveGroupCall &request); void on_request(uint64 id, const td_api::endGroupCall &request); - void on_request(uint64 id, const td_api::getGroupCallStreams &request); + void on_request(uint64 id, const td_api::getVideoChatStreams &request); - void on_request(uint64 id, td_api::getGroupCallStreamSegment &request); + void on_request(uint64 id, td_api::getVideoChatStreamSegment &request); + + void on_request(uint64 id, td_api::encryptGroupCallData &request); + + void on_request(uint64 id, td_api::decryptGroupCallData &request); void on_request(uint64 id, const td_api::upgradeBasicGroupChatToSupergroupChat &request); @@ -1245,6 +1263,8 @@ class Requests { void on_request(uint64 id, const td_api::toggleSupergroupCanHaveSponsoredMessages &request); + void on_request(uint64 id, const td_api::toggleSupergroupHasAutomaticTranslation &request); + void on_request(uint64 id, const td_api::toggleSupergroupHasHiddenMembers &request); void on_request(uint64 id, const td_api::toggleSupergroupHasAggressiveAntiSpamEnabled &request); @@ -1451,7 +1471,7 @@ class Requests { void on_request(uint64 id, td_api::stopPoll &request); - void on_request(uint64 id, const td_api::hideSuggestedAction &request); + void on_request(uint64 id, td_api::hideSuggestedAction &request); void on_request(uint64 id, const td_api::hideContactCloseBirthdays &request); @@ -1539,6 +1559,8 @@ class Requests { void on_request(uint64 id, td_api::transferGift &request); + void on_request(uint64 id, td_api::sendResoldGift &request); + void on_request(uint64 id, td_api::getReceivedGifts &request); void on_request(uint64 id, const td_api::getReceivedGift &request); @@ -1547,6 +1569,10 @@ class Requests { void on_request(uint64 id, const td_api::getUpgradedGiftWithdrawalUrl &request); + void on_request(uint64 id, const td_api::setGiftResalePrice &request); + + void on_request(uint64 id, td_api::searchGiftsForResale &request); + void on_request(uint64 id, td_api::createInvoiceLink &request); void on_request(uint64 id, td_api::refundStarPayment &request); diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/SavedMessagesManager.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/SavedMessagesManager.h index 78bce7e8d1..c9a4b26f88 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/SavedMessagesManager.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/SavedMessagesManager.h @@ -74,7 +74,7 @@ class SavedMessagesManager final : public Actor { void get_current_state(vector> &updates) const; private: - static constexpr int32 MAX_GET_HISTORY = 100; // server side limit + static constexpr int32 MAX_GET_HISTORY = 100; // server-side limit static constexpr int64 MIN_PINNED_TOPIC_ORDER = static_cast(2147000000) << 32; diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/SendCodeHelper.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/SendCodeHelper.h index 600068ba52..c0e9b44374 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/SendCodeHelper.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/SendCodeHelper.h @@ -47,15 +47,17 @@ class SendCodeHelper { telegram_api::object_ptr get_email_verify_purpose_login_setup() const; - Slice phone_number() const { + const string &get_phone_number() const { return phone_number_; } - Slice phone_code_hash() const { + + const string &get_phone_code_hash() const { return phone_code_hash_; } template void store(StorerT &storer) const; + template void parse(ParserT &parser); diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/StarGift.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/StarGift.h index c4b235655e..ed6b65c2e2 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/StarGift.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/StarGift.h @@ -47,6 +47,7 @@ class StarGift { int32 num_ = 0; int32 unique_availability_issued_ = 0; int32 unique_availability_total_ = 0; + int64 resale_star_count_ = 0; friend bool operator==(const StarGift &lhs, const StarGift &rhs); @@ -84,6 +85,8 @@ class StarGift { td_api::object_ptr get_upgraded_gift_object(Td *td) const; + td_api::object_ptr get_gift_for_resale_object(Td *td) const; + td_api::object_ptr get_sent_gift_object(Td *td) const; void add_dependencies(Dependencies &dependencies) const; diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/StarGiftAttribute.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/StarGiftAttribute.h index 5b498b6d22..c19ec0f104 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/StarGiftAttribute.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/StarGiftAttribute.h @@ -9,6 +9,7 @@ #include "td/telegram/DialogId.h" #include "td/telegram/files/FileId.h" #include "td/telegram/MessageEntity.h" +#include "td/telegram/StarGiftAttributeId.h" #include "td/telegram/td_api.h" #include "td/telegram/telegram_api.h" @@ -42,6 +43,8 @@ class StarGiftAttributeSticker { td_api::object_ptr get_upgraded_gift_symbol_object(const Td *td) const; + StarGiftAttributeId get_id(Td *td, bool is_model) const; + template void store(StorerT &storer) const; @@ -57,6 +60,7 @@ inline bool operator!=(const StarGiftAttributeSticker &lhs, const StarGiftAttrib class StarGiftAttributeBackdrop { string name_; + int32 id_ = 0; int32 center_color_ = 0; int32 edge_color_ = 0; int32 pattern_color_ = 0; @@ -81,6 +85,8 @@ class StarGiftAttributeBackdrop { td_api::object_ptr get_upgraded_gift_backdrop_object() const; + StarGiftAttributeId get_id() const; + template void store(StorerT &storer) const; diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/StarGiftAttributeId.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/StarGiftAttributeId.h new file mode 100644 index 0000000000..610e679bac --- /dev/null +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/StarGiftAttributeId.h @@ -0,0 +1,71 @@ +// +// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2025 +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +#pragma once + +#include "td/telegram/td_api.h" +#include "td/telegram/telegram_api.h" + +#include "td/utils/common.h" +#include "td/utils/HashTableUtils.h" +#include "td/utils/Status.h" +#include "td/utils/StringBuilder.h" + +namespace td { + +class StarGiftAttributeId { + enum class Type : int32 { None, Model, Pattern, Backdrop }; + Type type_ = Type::None; + int64 sticker_id_ = 0; + int32 backdrop_id_ = 0; + + StarGiftAttributeId(Type type, int64 sticker_id, int32 backdrop_id); + + static Result get_star_gift_attribute_id( + const td_api::object_ptr &attribute); + + telegram_api::object_ptr get_input_star_gift_attribute_id_object() const; + + friend struct StarGiftAttributeIdHash; + + friend bool operator==(const StarGiftAttributeId &lhs, const StarGiftAttributeId &rhs); + + friend StringBuilder &operator<<(StringBuilder &string_builder, const StarGiftAttributeId &attribute_id); + + public: + StarGiftAttributeId() = default; + + explicit StarGiftAttributeId(telegram_api::object_ptr attribute); + + static StarGiftAttributeId model(int64 sticker_id); + + static StarGiftAttributeId pattern(int64 sticker_id); + + static StarGiftAttributeId backdrop(int32 backdrop_id); + + static Result> get_star_gift_attribute_ids( + const vector> &attributes); + + static vector> get_input_star_gift_attribute_ids_object( + const vector &attributes); +}; + +struct StarGiftAttributeIdHash { + uint32 operator()(StarGiftAttributeId star_gift_attribute_id) const { + return star_gift_attribute_id.backdrop_id_ ? Hash()(star_gift_attribute_id.backdrop_id_) + : Hash()(star_gift_attribute_id.sticker_id_); + } +}; + +bool operator==(const StarGiftAttributeId &lhs, const StarGiftAttributeId &rhs); + +inline bool operator!=(const StarGiftAttributeId &lhs, const StarGiftAttributeId &rhs) { + return !(lhs == rhs); +} + +StringBuilder &operator<<(StringBuilder &string_builder, const StarGiftAttributeId &attribute_id); + +} // namespace td diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/StarGiftId.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/StarGiftId.h index 232be27b06..4cdcd0bd04 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/StarGiftId.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/StarGiftId.h @@ -18,7 +18,7 @@ namespace td { class Td; class StarGiftId { - enum class Type : int32 { Empty, ForUser, ForDialog }; + enum class Type : int32 { Empty, ForUser, ForDialog, Slug }; Type type_ = Type::Empty; ServerMessageId server_message_id_; @@ -26,6 +26,8 @@ class StarGiftId { DialogId dialog_id_; int64 saved_id_ = 0; + string slug_; + friend bool operator==(const StarGiftId &lhs, const StarGiftId &rhs); friend StringBuilder &operator<<(StringBuilder &string_builder, const StarGiftId &star_gift_id); @@ -37,6 +39,8 @@ class StarGiftId { StarGiftId(DialogId dialog_id, int64 saved_id); + static StarGiftId from_slug(const string &slug); + explicit StarGiftId(const string &star_gift_id); bool is_empty() const { diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/StarGiftManager.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/StarGiftManager.h index 2cd5464daa..4deb44ed05 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/StarGiftManager.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/StarGiftManager.h @@ -38,7 +38,7 @@ class StarGiftManager final : public Actor { StarGiftManager &operator=(StarGiftManager &&) = delete; ~StarGiftManager() final; - void get_gift_payment_options(Promise> &&promise); + void get_gift_payment_options(Promise> &&promise); void on_get_star_gift(const StarGift &star_gift, bool from_server); @@ -61,6 +61,9 @@ class StarGiftManager final : public Actor { void transfer_gift(BusinessConnectionId business_connection_id, StarGiftId star_gift_id, DialogId receiver_dialog_id, int64 star_count, Promise &&promise); + void send_resold_gift(const string &gift_name, DialogId receiver_dialog_id, int64 star_count, + Promise &&promise); + void get_saved_star_gifts(BusinessConnectionId business_connection_id, DialogId dialog_id, bool exclude_unsaved, bool exclude_saved, bool exclude_unlimited, bool exclude_limited, bool exclude_unique, bool sort_by_value, const string &offset, int32 limit, @@ -72,6 +75,13 @@ class StarGiftManager final : public Actor { void get_star_gift_withdrawal_url(StarGiftId star_gift_id, const string &password, Promise &&promise); + void set_star_gift_price(StarGiftId star_gift_id, int64 resale_star_count, Promise &&promise); + + void get_resale_star_gifts(int64 gift_id, const td_api::object_ptr &order, + const vector> &attributes, + const string &offset, int32 limit, + Promise> &&promise); + void register_gift(MessageFullId message_full_id, const char *source); void unregister_gift(MessageFullId message_full_id, const char *source); diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/StickersManager.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/StickersManager.h index f9314283f9..df837467d0 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/StickersManager.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/StickersManager.h @@ -75,6 +75,8 @@ class StickersManager final : public Actor { StickerFormat get_sticker_format(FileId file_id) const; + int64 get_sticker_id(FileId sticker_id) const; + bool is_premium_custom_emoji(CustomEmojiId custom_emoji_id, bool default_result) const; bool have_sticker(StickerSetId sticker_set_id, int64 sticker_id); @@ -464,9 +466,9 @@ class StickersManager final : public Actor { static constexpr int32 MAX_FEATURED_STICKER_SET_VIEW_DELAY = 5; static constexpr int32 OLD_FEATURED_STICKER_SET_SLICE_SIZE = 20; - static constexpr int32 MAX_FOUND_STICKERS = 100; // server side limit - static constexpr size_t MAX_STICKER_SET_TITLE_LENGTH = 64; // server side limit - static constexpr size_t MAX_STICKER_SET_SHORT_NAME_LENGTH = 64; // server side limit + static constexpr int32 MAX_FOUND_STICKERS = 100; // server-side limit + static constexpr size_t MAX_STICKER_SET_TITLE_LENGTH = 64; // server-side limit + static constexpr size_t MAX_STICKER_SET_SHORT_NAME_LENGTH = 64; // server-side limit static constexpr size_t MAX_GET_CUSTOM_EMOJI_STICKERS = 200; // server-side limit static constexpr int32 EMOJI_KEYWORDS_UPDATE_DELAY = 3600; @@ -607,8 +609,6 @@ class StickersManager final : public Actor { class UploadStickerFileCallback; - int64 get_sticker_id(FileId sticker_id) const; - CustomEmojiId get_custom_emoji_id(FileId sticker_id) const; PhotoFormat get_sticker_set_thumbnail_format(const StickerSet *sticker_set) const; diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/StoryManager.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/StoryManager.h index 7f8a770e55..8ff8bb880f 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/StoryManager.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/StoryManager.h @@ -220,7 +220,7 @@ class StoryManager final : public Actor { void update_dialogs_to_send_stories(ChannelId channel_id, bool can_send_stories); - void can_send_story(DialogId dialog_id, Promise> &&promise); + void can_send_story(DialogId dialog_id, Promise> &&promise); void send_story(DialogId dialog_id, td_api::object_ptr &&input_story_content, td_api::object_ptr &&input_areas, @@ -373,7 +373,7 @@ class StoryManager final : public Actor { td_api::object_ptr get_stories_object(int32 total_count, const vector &story_full_ids, const vector &pinned_story_ids) const; - static td_api::object_ptr get_can_send_story_result_object(const Status &error, + static td_api::object_ptr get_can_post_story_result_object(const Status &error, bool force = false); FileSourceId get_story_file_source_id(StoryFullId story_full_id); diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/SuggestedAction.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/SuggestedAction.h index ef69243d8a..ae882701c3 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/SuggestedAction.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/SuggestedAction.h @@ -7,7 +7,9 @@ #pragma once #include "td/telegram/DialogId.h" +#include "td/telegram/MessageEntity.h" #include "td/telegram/td_api.h" +#include "td/telegram/telegram_api.h" #include "td/utils/common.h" #include "td/utils/HashTableUtils.h" @@ -16,6 +18,8 @@ namespace td { +class UserManager; + struct SuggestedAction { enum class Type : int32 { Empty, @@ -32,11 +36,16 @@ struct SuggestedAction { BirthdaySetup, PremiumGrace, StarsSubscriptionLowBalance, - UserpicSetup + UserpicSetup, + Custom }; Type type_ = Type::Empty; DialogId dialog_id_; int32 otherwise_relogin_days_ = 0; + string custom_type_; + FormattedText title_; + FormattedText description_; + string url_; void init(Type type); @@ -48,9 +57,11 @@ struct SuggestedAction { explicit SuggestedAction(Slice action_str); + SuggestedAction(const UserManager *user_manager, telegram_api::object_ptr action); + SuggestedAction(Slice action_str, DialogId dialog_id); - explicit SuggestedAction(const td_api::object_ptr &suggested_action); + explicit SuggestedAction(td_api::object_ptr &&suggested_action); bool is_empty() const { return type_ == Type::Empty; @@ -58,7 +69,7 @@ struct SuggestedAction { string get_suggested_action_str() const; - td_api::object_ptr get_suggested_action_object() const; + td_api::object_ptr get_suggested_action_object(const UserManager *user_manager) const; template void store(StorerT &storer) const; @@ -74,7 +85,8 @@ struct SuggestedActionHash { }; inline bool operator==(const SuggestedAction &lhs, const SuggestedAction &rhs) { - return lhs.type_ == rhs.type_ && lhs.dialog_id_ == rhs.dialog_id_; + return lhs.type_ == rhs.type_ && lhs.dialog_id_ == rhs.dialog_id_ && lhs.custom_type_ == rhs.custom_type_ && + lhs.url_ == rhs.url_; } inline bool operator!=(const SuggestedAction &lhs, const SuggestedAction &rhs) { @@ -85,16 +97,24 @@ inline bool operator<(const SuggestedAction &lhs, const SuggestedAction &rhs) { if (lhs.dialog_id_ != rhs.dialog_id_) { return lhs.dialog_id_.get() < rhs.dialog_id_.get(); } - return static_cast(lhs.type_) < static_cast(rhs.type_); + if (lhs.type_ != rhs.type_) { + return static_cast(lhs.type_) < static_cast(rhs.type_); + } + if (lhs.custom_type_ != rhs.custom_type_) { + return lhs.custom_type_ == rhs.custom_type_; + } + return lhs.url_ < rhs.url_; } td_api::object_ptr get_update_suggested_actions_object( - const vector &added_actions, const vector &removed_actions, const char *source); + const UserManager *user_manager, const vector &added_actions, + const vector &removed_actions, const char *source); -bool update_suggested_actions(vector &suggested_actions, +bool update_suggested_actions(const UserManager *user_manager, vector &suggested_actions, vector &&new_suggested_actions); -bool remove_suggested_action(vector &suggested_actions, SuggestedAction suggested_action); +bool remove_suggested_action(const UserManager *user_manager, vector &suggested_actions, + SuggestedAction suggested_action); void dismiss_suggested_action(SuggestedAction action, Promise &&promise); diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/TranslationManager.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/TranslationManager.h index 22ee519dc1..9e0bb01bc8 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/TranslationManager.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/TranslationManager.h @@ -7,6 +7,7 @@ #pragma once #include "td/telegram/MessageEntity.h" +#include "td/telegram/MessageFullId.h" #include "td/telegram/td_api.h" #include "td/telegram/telegram_api.h" @@ -27,7 +28,8 @@ class TranslationManager final : public Actor { Promise> &&promise); void translate_text(FormattedText text, bool skip_bot_commands, int32 max_media_timestamp, - const string &to_language_code, Promise> &&promise); + MessageFullId message_full_id, const string &to_language_code, + Promise> &&promise); private: void tear_down() final; diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/UpdatesManager.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/UpdatesManager.h index f7a1ccae95..d6009b8c30 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/UpdatesManager.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/UpdatesManager.h @@ -115,7 +115,7 @@ class UpdatesManager final : public Actor { static vector> get_new_messages( const telegram_api::Updates *updates_ptr); - static vector get_update_new_group_call_ids(const telegram_api::Updates *updates_ptr); + static InputGroupCallId get_update_new_group_call_id(const telegram_api::Updates *updates_ptr); void process_updates_users_and_chats(telegram_api::Updates *updates_ptr); @@ -623,6 +623,7 @@ class UpdatesManager final : public Actor { void on_update(tl_object_ptr update, Promise &&promise); void on_update(tl_object_ptr update, Promise &&promise); + void on_update(tl_object_ptr update, Promise &&promise); void on_update(tl_object_ptr update, Promise &&promise); void on_update(tl_object_ptr update, Promise &&promise); diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/UserManager.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/UserManager.h index 21fe919dd7..d0057f8e67 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/UserManager.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/UserManager.h @@ -449,7 +449,7 @@ class UserManager final : public Actor { void on_deleted_contacts(const vector &deleted_contact_user_ids); - int32 get_imported_contact_count(Promise &&promise); + void get_imported_contact_count(Promise &&promise); std::pair, vector> change_imported_contacts(vector &contacts, int64 &random_id, Promise &&promise); @@ -752,8 +752,8 @@ class UserManager final : public Actor { class UserLogEvent; class SecretChatLogEvent; - static constexpr int32 MAX_GET_PROFILE_PHOTOS = 100; // server side limit - static constexpr size_t MAX_NAME_LENGTH = 64; // server side limit for first/last name + static constexpr int32 MAX_GET_PROFILE_PHOTOS = 100; // server-side limit + static constexpr size_t MAX_NAME_LENGTH = 64; // server-side limit for first/last name static constexpr int32 MAX_ACTIVE_STORY_ID_RELOAD_TIME = 3600; // some reasonable limit diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/UserStarGift.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/UserStarGift.h index 591478bdac..097581988d 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/UserStarGift.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/UserStarGift.h @@ -28,6 +28,8 @@ class UserStarGift { int64 upgrade_star_count_ = 0; int64 transfer_star_count_ = 0; int32 date_ = 0; + int32 can_transfer_at_ = 0; + int32 can_resell_at_ = 0; int32 can_export_at_ = 0; bool is_name_hidden_ = false; bool is_saved_ = false; diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/Version.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/Version.h index a3df017eba..8f779a5cea 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/Version.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/Version.h @@ -10,7 +10,7 @@ namespace td { -constexpr int32 MTPROTO_LAYER = 201; +constexpr int32 MTPROTO_LAYER = 203; enum class Version : int32 { Initial, // 0 diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/files/FileManager.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/files/FileManager.h index efce5456ce..f605c71d56 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/files/FileManager.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/files/FileManager.h @@ -550,8 +550,7 @@ class FileManager final : public Actor { Result get_suggested_file_name(FileId file_id, const string &directory); - void read_file_part(FileId file_id, int64 offset, int64 count, int left_tries, - Promise> promise); + void read_file_part(FileId file_id, int64 offset, int64 count, int left_tries, Promise promise); void delete_file(FileId file_id, Promise promise, const char *source); diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/logevent/LogEvent.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/logevent/LogEvent.h index 915d9266ed..92308d2490 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/logevent/LogEvent.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/logevent/LogEvent.h @@ -13,7 +13,6 @@ #include "td/utils/common.h" #include "td/utils/format.h" #include "td/utils/logging.h" -#include "td/utils/misc.h" #include "td/utils/Slice.h" #include "td/utils/Status.h" #include "td/utils/StorerBase.h" @@ -229,8 +228,6 @@ BufferSlice log_event_store_impl(const T &data, const char *file, int line) { BufferSlice value_buffer{storer_calc_length.get_length()}; auto ptr = value_buffer.as_mutable_slice().ubegin(); - LOG_CHECK(is_aligned_pointer<4>(ptr)) << ptr; - LogEventStorerUnsafe storer_unsafe(ptr); store(data, storer_unsafe); diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/misc.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/misc.h index bae968ac3e..66fcf6d966 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/misc.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/misc.h @@ -45,8 +45,8 @@ uint64 get_md5_string_hash(const string &str) TD_WARN_UNUSED_RESULT; // calculates hash of list of uint64 int64 get_vector_hash(const vector &numbers) TD_WARN_UNUSED_RESULT; -// returns emoji corresponding to the specified number -string get_emoji_fingerprint(uint64 num); +// returns 4 emoji corresponding to the specified 32-byte buffer +vector get_emoji_fingerprints(const unsigned char *buffer); // checks whether currency amount is valid bool check_currency_amount(int64 amount); diff --git a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/net/Session.h b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/net/Session.h index 9c1e9ccb2d..ff8cb407dc 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/td/telegram/net/Session.h +++ b/third-party/td/TdBinding/SharedHeaders/td/td/telegram/net/Session.h @@ -149,7 +149,7 @@ class Session final PendingQueries pending_queries_; std::map sent_queries_; std::deque pending_invoke_after_queries_; - ListNode sent_queries_list_; + ListNode sent_query_list_; struct ConnectionInfo { int8 connection_id_ = 0; @@ -197,7 +197,7 @@ class Session final double wakeup_at_ = 0.0; - // mtproto::AuthData should be the last field, because it's size is about 32 KB + // mtproto::AuthData should be the last field, because its size is about 32 KB mtproto::AuthData auth_data_; void on_handshake_ready(Result> r_handshake); diff --git a/third-party/td/TdBinding/SharedHeaders/td/tdactor/td/actor/impl/Scheduler-decl.h b/third-party/td/TdBinding/SharedHeaders/td/tdactor/td/actor/impl/Scheduler-decl.h index f05aa794cf..ecdd0e48b2 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/tdactor/td/actor/impl/Scheduler-decl.h +++ b/third-party/td/TdBinding/SharedHeaders/td/tdactor/td/actor/impl/Scheduler-decl.h @@ -228,8 +228,8 @@ class Scheduler { unique_ptr> actor_info_pool_; int32 actor_count_ = 0; - ListNode pending_actors_list_; - ListNode ready_actors_list_; + ListNode pending_actors_; + ListNode ready_actors_; KHeap timeout_queue_; FlatHashMap> pending_events_; diff --git a/third-party/td/TdBinding/SharedHeaders/td/tdactor/td/actor/impl/Scheduler.h b/third-party/td/TdBinding/SharedHeaders/td/tdactor/td/actor/impl/Scheduler.h index 8a23ca03da..e9ae2c5f08 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/tdactor/td/actor/impl/Scheduler.h +++ b/third-party/td/TdBinding/SharedHeaders/td/tdactor/td/actor/impl/Scheduler.h @@ -111,7 +111,7 @@ ActorOwn Scheduler::register_actor_impl(Slice name, ActorT *actor_ptr, A send_later(actor_id, Event::start()); do_migrate_actor(actor_info, sched_id); } else { - pending_actors_list_.put(weak_info->get_list_node()); + pending_actors_.put(weak_info->get_list_node()); if (ActorTraits::need_start_up) { send_later(actor_id, Event::start()); } diff --git a/third-party/td/TdBinding/SharedHeaders/td/tddb/td/db/BinlogKeyValue.h b/third-party/td/TdBinding/SharedHeaders/td/tddb/td/db/BinlogKeyValue.h index c9c2a1ee1d..e713187738 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/tddb/td/db/BinlogKeyValue.h +++ b/third-party/td/TdBinding/SharedHeaders/td/tddb/td/db/BinlogKeyValue.h @@ -45,13 +45,13 @@ class BinlogKeyValue final : public KeyValueSyncInterface { Slice key; Slice value; template - void store(StorerT &&storer) const { + void store(StorerT &storer) const { storer.store_string(key); storer.store_string(value); } template - void parse(ParserT &&parser) { + void parse(ParserT &parser) { key = parser.template fetch_string(); value = parser.template fetch_string(); } @@ -84,7 +84,10 @@ class BinlogKeyValue final : public KeyValueSyncInterface { name, [&](const BinlogEvent &binlog_event) { Event event; - event.parse(TlParser(binlog_event.get_data())); + TlParser event_parser(binlog_event.get_data()); + event.parse(event_parser); + event_parser.fetch_end(); + LOG_CHECK(event_parser.get_error() == nullptr) << event_parser.get_status(); if (event.key.empty()) { LOG(ERROR) << "Have event with empty key"; return; @@ -109,7 +112,10 @@ class BinlogKeyValue final : public KeyValueSyncInterface { void external_init_handle(const BinlogEvent &binlog_event) { Event event; - event.parse(TlParser(binlog_event.get_data())); + TlParser event_parser(binlog_event.get_data()); + event.parse(event_parser); + event_parser.fetch_end(); + LOG_CHECK(event_parser.get_error() == nullptr) << event_parser.get_status(); if (event.key.empty()) { LOG(ERROR) << "Have external event with empty key"; return; diff --git a/third-party/td/TdBinding/SharedHeaders/td/tde2e/td/e2e/Blockchain.h b/third-party/td/TdBinding/SharedHeaders/td/tde2e/td/e2e/Blockchain.h index fad35e91ef..59d48e34c9 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/tde2e/td/e2e/Blockchain.h +++ b/third-party/td/TdBinding/SharedHeaders/td/tde2e/td/e2e/Blockchain.h @@ -43,7 +43,7 @@ struct GroupParticipant { td::int64 user_id{0}; td::int32 flags{0}; PublicKey public_key{}; - td::int32 version{0}; + td::int32 version{1}; bool add_users() const { return (flags & GroupParticipantFlags::AddUsers) != 0; } diff --git a/third-party/td/TdBinding/SharedHeaders/td/tde2e/td/e2e/Mnemonic.h b/third-party/td/TdBinding/SharedHeaders/td/tde2e/td/e2e/Mnemonic.h index 79534ee0d7..2869e1b255 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/tde2e/td/e2e/Mnemonic.h +++ b/third-party/td/TdBinding/SharedHeaders/td/tde2e/td/e2e/Mnemonic.h @@ -23,7 +23,7 @@ class Mnemonic { static td::Result create(std::vector words, td::SecureString password); struct Options { Options(); - int words_count = 24; + int word_count = 24; td::SecureString password; td::SecureString entropy; }; diff --git a/third-party/td/TdBinding/SharedHeaders/td/tde2e/td/e2e/e2e_api.h b/third-party/td/TdBinding/SharedHeaders/td/tde2e/td/e2e/e2e_api.h index 7f70dd35c1..7c6dcad802 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/tde2e/td/e2e/e2e_api.h +++ b/third-party/td/TdBinding/SharedHeaders/td/tde2e/td/e2e/e2e_api.h @@ -54,6 +54,11 @@ class Result { return std::holds_alternative(data_); } + // Check if the result is an error + bool is_error() const { + return std::holds_alternative(data_); + } + T &value() { return std::get(data_); } @@ -283,8 +288,8 @@ Result storage_get_blockchain_state(StorageId); using CallId = std::int64_t; using CallChannelId = std::int32_t; struct CallParticipant { - UserId user_id; - PublicKeyId public_key_id; + UserId user_id{}; + PublicKeyId public_key_id{}; int permissions{}; }; diff --git a/third-party/td/TdBinding/SharedHeaders/td/tde2e/td/e2e/e2e_errors.h b/third-party/td/TdBinding/SharedHeaders/td/tde2e/td/e2e/e2e_errors.h index 66735716ec..00c7bc970f 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/tde2e/td/e2e/e2e_errors.h +++ b/third-party/td/TdBinding/SharedHeaders/td/tde2e/td/e2e/e2e_errors.h @@ -41,6 +41,7 @@ enum class ErrorCode : int { CallFailed = 601, CallKeyAlreadyUsed = 602 }; + inline std::string_view error_string(ErrorCode error_code) { switch (error_code) { case ErrorCode::Any: diff --git a/third-party/td/TdBinding/SharedHeaders/td/tdtl/td/tl/tl_config.h b/third-party/td/TdBinding/SharedHeaders/td/tdtl/td/tl/tl_config.h index 0b3e55fde0..353ff1bcb6 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/tdtl/td/tl/tl_config.h +++ b/third-party/td/TdBinding/SharedHeaders/td/tdtl/td/tl/tl_config.h @@ -64,7 +64,7 @@ class tl_config_parser { tl_tree *read_type_expr(int *var_count); tl_tree *read_nat_expr(int *var_count); tl_tree *read_expr(int *var_count); - std::vector read_args_list(int *var_count); + std::vector read_args(int *var_count); tl_combinator *read_combinator(); tl_type *read_type(); diff --git a/third-party/td/TdBinding/SharedHeaders/td/tdutils/td/utils/StealingQueue.h b/third-party/td/TdBinding/SharedHeaders/td/tdutils/td/utils/StealingQueue.h index 092dbf8017..c3ab53ba3c 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/tdutils/td/utils/StealingQueue.h +++ b/third-party/td/TdBinding/SharedHeaders/td/tdutils/td/utils/StealingQueue.h @@ -21,7 +21,7 @@ class StealingQueue { // tries to put a value // returns if succeeded - // only owner is allowed to to do this + // only owner is allowed to do this template void local_push(T value, F &&overflow_f) { while (true) { diff --git a/third-party/td/TdBinding/SharedHeaders/td/tdutils/td/utils/emoji.h b/third-party/td/TdBinding/SharedHeaders/td/tdutils/td/utils/emoji.h index a9877d581e..cb9af3fcf8 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/tdutils/td/utils/emoji.h +++ b/third-party/td/TdBinding/SharedHeaders/td/tdutils/td/utils/emoji.h @@ -14,7 +14,7 @@ namespace td { // checks whether the string is an emoji; variation selectors are ignored bool is_emoji(Slice str); -// checks whether emoji ends on a Fitzpatrick modifier and returns it's number or 0 +// checks whether emoji ends on a Fitzpatrick modifier and returns its number or 0 int get_fitzpatrick_modifier(Slice emoji); // removes all Fitzpatrick modifier from the end of the string diff --git a/third-party/td/TdBinding/SharedHeaders/td/tdutils/td/utils/tl_helpers.h b/third-party/td/TdBinding/SharedHeaders/td/tdutils/td/utils/tl_helpers.h index 8deea3e774..7274455a21 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/tdutils/td/utils/tl_helpers.h +++ b/third-party/td/TdBinding/SharedHeaders/td/tdutils/td/utils/tl_helpers.h @@ -12,7 +12,6 @@ #include "td/utils/SharedSlice.h" #include "td/utils/Slice.h" #include "td/utils/SliceBuilder.h" -#include "td/utils/StackAllocator.h" #include "td/utils/Status.h" #include "td/utils/tl_parsers.h" #include "td/utils/tl_storers.h" @@ -287,19 +286,10 @@ string serialize(const T &object) { size_t length = calc_length.get_length(); string key(length, '\0'); - if (!is_aligned_pointer<4>(key.data())) { - auto ptr = StackAllocator::alloc(length); - MutableSlice data = ptr.as_slice(); - TlStorerUnsafe storer(data.ubegin()); - store(object, storer); - CHECK(storer.get_buf() == data.uend()); - key.assign(data.begin(), data.size()); - } else { - MutableSlice data = key; - TlStorerUnsafe storer(data.ubegin()); - store(object, storer); - CHECK(storer.get_buf() == data.uend()); - } + MutableSlice data = key; + TlStorerUnsafe storer(data.ubegin()); + store(object, storer); + CHECK(storer.get_buf() == data.uend()); return key; } @@ -310,7 +300,6 @@ SecureString serialize_secure(const T &object) { size_t length = calc_length.get_length(); SecureString key(length, '\0'); - CHECK(is_aligned_pointer<4>(key.data())); MutableSlice data = key.as_mutable_slice(); TlStorerUnsafe storer(data.ubegin()); store(object, storer); diff --git a/third-party/td/TdBinding/SharedHeaders/td/tdutils/td/utils/tl_parsers.h b/third-party/td/TdBinding/SharedHeaders/td/tdutils/td/utils/tl_parsers.h index 62576124d2..571ff7a119 100644 --- a/third-party/td/TdBinding/SharedHeaders/td/tdutils/td/utils/tl_parsers.h +++ b/third-party/td/TdBinding/SharedHeaders/td/tdutils/td/utils/tl_parsers.h @@ -13,11 +13,8 @@ #include "td/utils/Status.h" #include "td/utils/UInt.h" -#include #include #include -#include -#include namespace td { @@ -26,11 +23,7 @@ class TlParser { size_t data_len = 0; size_t left_len = 0; size_t error_pos = std::numeric_limits::max(); - std::string error; - - std::unique_ptr data_buf; - static constexpr size_t SMALL_DATA_ARRAY_SIZE = 6; - std::array small_data_array; + string error; alignas(4) static const unsigned char empty_data[sizeof(UInt512)];