diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 3510c1318..cd68c97cc 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -4480,6 +4480,9 @@ premiumLimitTypeStoryCaptionLength = PremiumLimitType; //@description The maximum number of suggested reaction areas on a story premiumLimitTypeStorySuggestedReactionAreaCount = PremiumLimitType; +//@description The maximum number of received similar chats +premiumLimitTypeSimilarChatCount = PremiumLimitType; + //@class PremiumFeature @description Describes a feature available to Premium users diff --git a/td/telegram/ConfigManager.h b/td/telegram/ConfigManager.h index a71797ece..03f4abfd3 100644 --- a/td/telegram/ConfigManager.h +++ b/td/telegram/ConfigManager.h @@ -102,7 +102,7 @@ class ConfigManager final : public NetQueryCallback { private: struct AppConfig { - static constexpr int32 CURRENT_VERSION = 24; + static constexpr int32 CURRENT_VERSION = 25; int32 version_ = 0; int32 hash_ = 0; telegram_api::object_ptr config_; diff --git a/td/telegram/OptionManager.cpp b/td/telegram/OptionManager.cpp index 446e47303..cab576d97 100644 --- a/td/telegram/OptionManager.cpp +++ b/td/telegram/OptionManager.cpp @@ -327,6 +327,7 @@ bool OptionManager::is_internal_option(Slice name) { case 'r': return name == "rating_e_decay" || name == "reactions_uniq_max" || name == "reactions_user_max_default" || name == "reactions_user_max_premium" || name == "recent_stickers_limit" || + name == "recommended_channels_limit_default" || name == "recommended_channels_limit_premium" || name == "restriction_add_platforms" || name == "revoke_pm_inbox" || name == "revoke_time_limit" || name == "revoke_pm_time_limit"; case 's': diff --git a/td/telegram/Premium.cpp b/td/telegram/Premium.cpp index 3e3bc17f3..3315310bc 100644 --- a/td/telegram/Premium.cpp +++ b/td/telegram/Premium.cpp @@ -634,7 +634,8 @@ const vector &get_premium_limit_keys() { "story_caption_length", "stories_sent_weekly", "stories_sent_monthly", - "stories_suggested_reactions"}; + "stories_suggested_reactions", + "recommended_channels"}; return limit_keys; } @@ -675,6 +676,8 @@ static Slice get_limit_type_key(const td_api::PremiumLimitType *limit_type) { return Slice("stories_sent_monthly"); case td_api::premiumLimitTypeStorySuggestedReactionAreaCount::ID: return Slice("stories_suggested_reactions"); + case td_api::premiumLimitTypeSimilarChatCount::ID: + return Slice("recommended_channels"); default: UNREACHABLE(); return Slice(); @@ -853,6 +856,9 @@ static td_api::object_ptr get_premium_limit_object(Slice k if (key == "stories_suggested_reactions") { return td_api::make_object(); } + if (key == "recommended_channels") { + return td_api::make_object(); + } UNREACHABLE(); return nullptr; }();