Add premiumLimitTypeStorySuggestedReactionAreaCount.
This commit is contained in:
parent
583168767d
commit
0f7193172b
@ -4223,6 +4223,9 @@ premiumLimitTypeMonthlySentStoryCount = PremiumLimitType;
|
||||
//@description The maximum length of captions of sent stories
|
||||
premiumLimitTypeStoryCaptionLength = PremiumLimitType;
|
||||
|
||||
//@description The maximum number of suggested reaction areas on a story
|
||||
premiumLimitTypeStorySuggestedReactionAreaCount = PremiumLimitType;
|
||||
|
||||
|
||||
//@class PremiumFeature @description Describes a feature available to Premium users
|
||||
|
||||
|
@ -2025,6 +2025,8 @@ void ConfigManager::process_app_config(tl_object_ptr<telegram_api::JSONValue> &c
|
||||
options.get_option_integer("stories_sent_monthly_limit_premium", 3000));
|
||||
options.set_option_integer("story_caption_length_max",
|
||||
options.get_option_integer("story_caption_length_limit_premium", 2048));
|
||||
options.set_option_integer("story_suggested_reaction_area_count_max",
|
||||
options.get_option_integer("stories_suggested_reactions_limit_premium", 5));
|
||||
options.set_option_integer("bio_length_max", options.get_option_integer("about_length_limit_premium", 140));
|
||||
options.set_option_integer("saved_animations_limit", options.get_option_integer("saved_gifs_limit_premium", 400));
|
||||
options.set_option_integer("favorite_stickers_limit",
|
||||
@ -2048,6 +2050,8 @@ void ConfigManager::process_app_config(tl_object_ptr<telegram_api::JSONValue> &c
|
||||
options.get_option_integer("stories_sent_monthly_limit_default", 30));
|
||||
options.set_option_integer("story_caption_length_max",
|
||||
options.get_option_integer("story_caption_length_limit_default", 200));
|
||||
options.set_option_integer("story_suggested_reaction_area_count_max",
|
||||
options.get_option_integer("stories_suggested_reactions_limit_default", 1));
|
||||
options.set_option_integer("bio_length_max", options.get_option_integer("about_length_limit_default", 70));
|
||||
options.set_option_integer("saved_animations_limit", options.get_option_integer("saved_gifs_limit_default", 200));
|
||||
options.set_option_integer("favorite_stickers_limit",
|
||||
|
@ -102,7 +102,7 @@ class ConfigManager final : public NetQueryCallback {
|
||||
|
||||
private:
|
||||
struct AppConfig {
|
||||
static constexpr int32 CURRENT_VERSION = 13;
|
||||
static constexpr int32 CURRENT_VERSION = 14;
|
||||
int32 version_ = 0;
|
||||
int32 hash_ = 0;
|
||||
telegram_api::object_ptr<telegram_api::JSONValue> config_;
|
||||
|
@ -315,7 +315,8 @@ bool OptionManager::is_internal_option(Slice name) {
|
||||
name == "stickers_normal_by_emoji_per_premium_num" || name == "stickers_premium_by_emoji_num" ||
|
||||
name == "stories_changelog_user_id" || name == "stories_sent_monthly_limit_default" ||
|
||||
name == "stories_sent_monthly_limit_premium" || name == "stories_sent_weekly_limit_default" ||
|
||||
name == "stories_sent_weekly_limit_premium" || name == "story_caption_length_limit_default" ||
|
||||
name == "stories_sent_weekly_limit_premium" || name == "stories_suggested_reactions_limit_default" ||
|
||||
name == "stories_suggested_reactions_limit_premium" || name == "story_caption_length_limit_default" ||
|
||||
name == "story_caption_length_limit_premium" || name == "story_expiring_limit_default" ||
|
||||
name == "story_expiring_limit_premium";
|
||||
case 'v':
|
||||
|
@ -309,7 +309,8 @@ const vector<Slice> &get_premium_limit_keys() {
|
||||
"story_expiring",
|
||||
"story_caption_length",
|
||||
"stories_sent_weekly",
|
||||
"stories_sent_monthly"};
|
||||
"stories_sent_monthly",
|
||||
"stories_suggested_reactions"};
|
||||
return limit_keys;
|
||||
}
|
||||
|
||||
@ -348,6 +349,8 @@ static Slice get_limit_type_key(const td_api::PremiumLimitType *limit_type) {
|
||||
return Slice("stories_sent_weekly");
|
||||
case td_api::premiumLimitTypeMonthlySentStoryCount::ID:
|
||||
return Slice("stories_sent_monthly");
|
||||
case td_api::premiumLimitTypeStorySuggestedReactionAreaCount::ID:
|
||||
return Slice("stories_suggested_reactions");
|
||||
default:
|
||||
UNREACHABLE();
|
||||
return Slice();
|
||||
@ -517,6 +520,9 @@ static td_api::object_ptr<td_api::premiumLimit> get_premium_limit_object(Slice k
|
||||
if (key == "stories_sent_monthly") {
|
||||
return td_api::make_object<td_api::premiumLimitTypeMonthlySentStoryCount>();
|
||||
}
|
||||
if (key == "stories_suggested_reactions") {
|
||||
return td_api::make_object<td_api::premiumLimitTypeStorySuggestedReactionAreaCount>();
|
||||
}
|
||||
UNREACHABLE();
|
||||
return nullptr;
|
||||
}();
|
||||
|
Loading…
Reference in New Issue
Block a user