Add two new premiumLimitTypes.

This commit is contained in:
levlam 2023-04-06 14:24:14 +03:00
parent 82382ce416
commit 6cef99b3eb
2 changed files with 19 additions and 1 deletions

View File

@ -3890,6 +3890,12 @@ premiumLimitTypeCaptionLength = PremiumLimitType;
//@description The maximum length of the user's bio
premiumLimitTypeBioLength = PremiumLimitType;
//@description The maximum number of invite links for a chat folder
premiumLimitTypeChatFolderInviteLinkCount = PremiumLimitType;
//@description The maximum number of added shareable chat folders
premiumLimitTypeShareableChatFolderCount = PremiumLimitType;
//@class PremiumFeature @description Describes a feature available to Premium users

View File

@ -300,7 +300,9 @@ const vector<Slice> &get_premium_limit_keys() {
"dialogs_folder_pinned",
"channels_public",
"caption_length",
"about_length"};
"about_length",
"chatlist_invites",
"chatlists_joined"};
return limit_keys;
}
@ -327,6 +329,10 @@ static Slice get_limit_type_key(const td_api::PremiumLimitType *limit_type) {
return Slice("caption_length");
case td_api::premiumLimitTypeBioLength::ID:
return Slice("about_length");
case td_api::premiumLimitTypeChatFolderInviteLinkCount::ID:
return Slice("chatlist_invites");
case td_api::premiumLimitTypeShareableChatFolderCount::ID:
return Slice("chatlists_joined");
default:
UNREACHABLE();
return Slice();
@ -448,6 +454,12 @@ static td_api::object_ptr<td_api::premiumLimit> get_premium_limit_object(Slice k
if (key == "about_length") {
return td_api::make_object<td_api::premiumLimitTypeBioLength>();
}
if (key == "chatlist_invites") {
return td_api::make_object<td_api::premiumLimitTypeChatFolderInviteLinkCount>();
}
if (key == "chatlists_joined") {
return td_api::make_object<td_api::premiumLimitTypeShareableChatFolderCount>();
}
UNREACHABLE();
return nullptr;
}();