diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index 1a5f07f6f..0136843cf 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -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; diff --git a/td/telegram/Premium.cpp b/td/telegram/Premium.cpp index 7ce74448c..aaf24bd1c 100644 --- a/td/telegram/Premium.cpp +++ b/td/telegram/Premium.cpp @@ -101,6 +101,9 @@ static td_api::object_ptr get_premium_feature_object(Sli if (premium_feature == "saved_tags") { return td_api::make_object(); } + if (premium_feature == "message_privacy") { + return td_api::make_object(); + } 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(); }