diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index bd3cfc7b5..f32a5f304 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -3984,6 +3984,9 @@ premiumLimitTypeShareableChatFolderCount = PremiumLimitType; //@description The maximum number of active stories premiumLimitTypeActiveStoryCount = PremiumLimitType; +//@description The maximum length of captions of sent stoories +premiumLimitTypeStoryCaptionLength = PremiumLimitType; + //@class PremiumFeature @description Describes a feature available to Premium users diff --git a/td/telegram/OptionManager.cpp b/td/telegram/OptionManager.cpp index 99f261725..6513a55c3 100644 --- a/td/telegram/OptionManager.cpp +++ b/td/telegram/OptionManager.cpp @@ -302,7 +302,8 @@ bool OptionManager::is_internal_option(Slice name) { name == "saved_gifs_limit_premium" || name == "session_count" || name == "since_last_open" || name == "stickers_faved_limit_default" || name == "stickers_faved_limit_premium" || name == "stickers_normal_by_emoji_per_premium_num" || name == "stickers_premium_by_emoji_num" || - name == "stories_changelog_user_id" || name == "story_expiring_limit_default" || + name == "stories_changelog_user_id" || name == "story_caption_length_limit_default" || + name == "story_caption_length_limit_premium" || name == "story_expiring_limit_default" || name == "story_expiring_limit_premium"; case 'v': return name == "video_note_size_max"; diff --git a/td/telegram/Premium.cpp b/td/telegram/Premium.cpp index 4f82b8480..a705e024f 100644 --- a/td/telegram/Premium.cpp +++ b/td/telegram/Premium.cpp @@ -303,7 +303,8 @@ const vector &get_premium_limit_keys() { "about_length", "chatlist_invites", "chatlists_joined", - "story_expiring"}; + "story_expiring", + "story_caption_length"}; return limit_keys; } @@ -336,6 +337,8 @@ static Slice get_limit_type_key(const td_api::PremiumLimitType *limit_type) { return Slice("chatlists_joined"); case td_api::premiumLimitTypeActiveStoryCount::ID: return Slice("story_expiring"); + case td_api::premiumLimitTypeStoryCaptionLength::ID: + return Slice("story_caption_length"); default: UNREACHABLE(); return Slice(); @@ -466,6 +469,9 @@ static td_api::object_ptr get_premium_limit_object(Slice k if (key == "story_expiring") { return td_api::make_object(); } + if (key == "story_caption_length") { + return td_api::make_object(); + } UNREACHABLE(); return nullptr; }();