Add td_api::premiumFeatureMessagePrivacy.

This commit is contained in:
levlam 2024-02-12 23:27:44 +03:00
parent 02d1cef461
commit b9de5cd0f9
2 changed files with 10 additions and 1 deletions

View File

@ -4798,6 +4798,10 @@ premiumFeatureBackgroundForBoth = PremiumFeature;
//@description The ability to use tags in Saved Messages
premiumFeatureSavedMessagesTags = PremiumFeature;
//@description The ability to disallow incoming voice and video note messages in private chats using setUserPrivacySettingRules with userPrivacySettingAllowPrivateVoiceAndVideoNoteMessages
//-and to restrict incoming messages from non-contacts using setNewChatPrivacySettings
premiumFeatureMessagePrivacy = PremiumFeature;
//@class PremiumStoryFeature @description Describes a story feature available to Premium users
@ -5421,7 +5425,7 @@ userPrivacySettingAllowPeerToPeerCalls = UserPrivacySetting;
//@description A privacy setting for managing whether the user can be found by their phone number. Checked only if the phone number is not known to the other user. Can be set only to "Allow contacts" or "Allow all"
userPrivacySettingAllowFindingByPhoneNumber = UserPrivacySetting;
//@description A privacy setting for managing whether the user can receive voice and video messages in private chats
//@description A privacy setting for managing whether the user can receive voice and video messages in private chats; for Telegram Premium users only
userPrivacySettingAllowPrivateVoiceAndVideoNoteMessages = UserPrivacySetting;

View File

@ -101,6 +101,9 @@ static td_api::object_ptr<td_api::PremiumFeature> get_premium_feature_object(Sli
if (premium_feature == "saved_tags") {
return td_api::make_object<td_api::premiumFeatureSavedMessagesTags>();
}
if (premium_feature == "message_privacy") {
return td_api::make_object<td_api::premiumFeatureMessagePrivacy>();
}
return nullptr;
}
@ -751,6 +754,8 @@ static string get_premium_source(const td_api::PremiumFeature *feature) {
return "wallpapers";
case td_api::premiumFeatureSavedMessagesTags::ID:
return "saved_tags";
case td_api::premiumFeatureMessagePrivacy::ID:
return "message_privacy";
default:
UNREACHABLE();
}