Add td_api::premiumFeatureEmojiStatus.

This commit is contained in:
levlam 2022-09-06 23:47:11 +03:00
parent 886a6125e9
commit b8438b92ae
2 changed files with 16 additions and 8 deletions

View File

@ -3059,6 +3059,9 @@ premiumFeatureAdvancedChatManagement = PremiumFeature;
//@description A badge in the user's profile
premiumFeatureProfileBadge = PremiumFeature;
//@description A emoji status shown along with the user's name
premiumFeatureEmojiStatus = PremiumFeature;
//@description Profile photo animation on message and chat screens
premiumFeatureAnimatedProfilePhoto = PremiumFeature;

View File

@ -45,7 +45,7 @@ static td_api::object_ptr<td_api::PremiumFeature> get_premium_feature_object(Sli
if (premium_feature == "no_ads") {
return td_api::make_object<td_api::premiumFeatureDisabledAds>();
}
if (premium_feature == "unique_reactions") {
if (premium_feature == "unique_reactions" || premium_feature == "infinite_reactions") {
return td_api::make_object<td_api::premiumFeatureUniqueReactions>();
}
if (premium_feature == "premium_stickers") {
@ -60,6 +60,9 @@ static td_api::object_ptr<td_api::PremiumFeature> get_premium_feature_object(Sli
if (premium_feature == "profile_badge") {
return td_api::make_object<td_api::premiumFeatureProfileBadge>();
}
if (premium_feature == "emoji_status") {
return td_api::make_object<td_api::premiumFeatureEmojiStatus>();
}
if (premium_feature == "animated_userpics") {
return td_api::make_object<td_api::premiumFeatureAnimatedProfilePhoto>();
}
@ -342,7 +345,7 @@ static string get_premium_source(const td_api::PremiumFeature *feature) {
case td_api::premiumFeatureDisabledAds::ID:
return "no_ads";
case td_api::premiumFeatureUniqueReactions::ID:
return "unique_reactions";
return "infinite_reactions";
case td_api::premiumFeatureUniqueStickers::ID:
return "premium_stickers";
case td_api::premiumFeatureCustomEmoji::ID:
@ -351,6 +354,8 @@ static string get_premium_source(const td_api::PremiumFeature *feature) {
return "advanced_chat_management";
case td_api::premiumFeatureProfileBadge::ID:
return "profile_badge";
case td_api::premiumFeatureEmojiStatus::ID:
return "emoji_status";
case td_api::premiumFeatureAnimatedProfilePhoto::ID:
return "animated_userpics";
case td_api::premiumFeatureAppIcons::ID:
@ -443,11 +448,11 @@ void get_premium_limit(const td_api::object_ptr<td_api::PremiumLimitType> &limit
void get_premium_features(Td *td, const td_api::object_ptr<td_api::PremiumSource> &source,
Promise<td_api::object_ptr<td_api::premiumFeatures>> &&promise) {
auto premium_features =
full_split(G()->get_option_string(
auto premium_features = full_split(
G()->get_option_string(
"premium_features",
"double_limits,more_upload,faster_download,voice_to_text,no_ads,unique_reactions,premium_stickers,"
"animated_emoji,advanced_chat_management,profile_badge,animated_userpics,app_icons"),
"double_limits,more_upload,faster_download,voice_to_text,no_ads,infinite_reactions,premium_stickers,"
"animated_emoji,advanced_chat_management,profile_badge,emoji_status,animated_userpics,app_icons"),
',');
vector<td_api::object_ptr<td_api::PremiumFeature>> features;
for (const auto &premium_feature : premium_features) {