Add td_api::premiumLimitTypeSimilarChatCount.

This commit is contained in:
levlam 2023-11-28 14:22:08 +03:00
parent dd5bd9fff6
commit 00f09dae62
4 changed files with 12 additions and 2 deletions

View File

@ -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

View File

@ -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<telegram_api::JSONValue> config_;

View File

@ -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':

View File

@ -634,7 +634,8 @@ const vector<Slice> &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<td_api::premiumLimit> get_premium_limit_object(Slice k
if (key == "stories_suggested_reactions") {
return td_api::make_object<td_api::premiumLimitTypeStorySuggestedReactionAreaCount>();
}
if (key == "recommended_channels") {
return td_api::make_object<td_api::premiumLimitTypeSimilarChatCount>();
}
UNREACHABLE();
return nullptr;
}();