Add td_api::premiumLimitTypeActiveStoryCount.

This commit is contained in:
levlam 2023-06-15 20:38:46 +03:00
parent 087765114a
commit cc14dbb8a1
3 changed files with 11 additions and 2 deletions

View File

@ -3965,6 +3965,9 @@ premiumLimitTypeChatFolderInviteLinkCount = PremiumLimitType;
//@description The maximum number of added shareable chat folders
premiumLimitTypeShareableChatFolderCount = PremiumLimitType;
//@description The maximum number of active stories
premiumLimitTypeActiveStoryCount = PremiumLimitType;
//@class PremiumFeature @description Describes a feature available to Premium users

View File

@ -106,7 +106,7 @@ class ConfigManager final : public NetQueryCallback {
private:
struct AppConfig {
static constexpr int32 CURRENT_VERSION = 2;
static constexpr int32 CURRENT_VERSION = 3;
int32 version_ = 0;
int32 hash_ = 0;
telegram_api::object_ptr<telegram_api::JSONValue> config_;

View File

@ -302,7 +302,8 @@ const vector<Slice> &get_premium_limit_keys() {
"caption_length",
"about_length",
"chatlist_invites",
"chatlists_joined"};
"chatlists_joined",
"story_expiring"};
return limit_keys;
}
@ -333,6 +334,8 @@ static Slice get_limit_type_key(const td_api::PremiumLimitType *limit_type) {
return Slice("chatlist_invites");
case td_api::premiumLimitTypeShareableChatFolderCount::ID:
return Slice("chatlists_joined");
case td_api::premiumLimitTypeActiveStoryCount::ID:
return Slice("story_expiring");
default:
UNREACHABLE();
return Slice();
@ -460,6 +463,9 @@ static td_api::object_ptr<td_api::premiumLimit> get_premium_limit_object(Slice k
if (key == "chatlists_joined") {
return td_api::make_object<td_api::premiumLimitTypeShareableChatFolderCount>();
}
if (key == "story_expiring") {
return td_api::make_object<td_api::premiumLimitTypeActiveStoryCount>();
}
UNREACHABLE();
return nullptr;
}();