Add td_api::PremiumStoryFeature.
This commit is contained in:
parent
0f39a16321
commit
8c7076fe97
@ -3984,7 +3984,7 @@ premiumLimitTypeShareableChatFolderCount = PremiumLimitType;
|
|||||||
//@description The maximum number of active stories
|
//@description The maximum number of active stories
|
||||||
premiumLimitTypeActiveStoryCount = PremiumLimitType;
|
premiumLimitTypeActiveStoryCount = PremiumLimitType;
|
||||||
|
|
||||||
//@description The maximum length of captions of sent stoories
|
//@description The maximum length of captions of sent stories
|
||||||
premiumLimitTypeStoryCaptionLength = PremiumLimitType;
|
premiumLimitTypeStoryCaptionLength = PremiumLimitType;
|
||||||
|
|
||||||
|
|
||||||
@ -4020,7 +4020,7 @@ premiumFeatureAdvancedChatManagement = PremiumFeature;
|
|||||||
//@description A badge in the user's profile
|
//@description A badge in the user's profile
|
||||||
premiumFeatureProfileBadge = PremiumFeature;
|
premiumFeatureProfileBadge = PremiumFeature;
|
||||||
|
|
||||||
//@description A emoji status shown along with the user's name
|
//@description An emoji status shown along with the user's name
|
||||||
premiumFeatureEmojiStatus = PremiumFeature;
|
premiumFeatureEmojiStatus = PremiumFeature;
|
||||||
|
|
||||||
//@description Profile photo animation on message and chat screens
|
//@description Profile photo animation on message and chat screens
|
||||||
@ -4039,6 +4039,27 @@ premiumFeatureRealTimeChatTranslation = PremiumFeature;
|
|||||||
premiumFeatureUpgradedStories = PremiumFeature;
|
premiumFeatureUpgradedStories = PremiumFeature;
|
||||||
|
|
||||||
|
|
||||||
|
//@class PremiumStoryFeature @description Describes a story feature available to Premium users
|
||||||
|
|
||||||
|
//@description User stories are displayed before stories of non-premium contacts
|
||||||
|
premiumStoryFeaturePriorityOrder = PremiumStoryFeature;
|
||||||
|
|
||||||
|
//@description The ability to hide the fact that the user viewed other's stories
|
||||||
|
premiumStoryFeatureStealthMode = PremiumStoryFeature;
|
||||||
|
|
||||||
|
//@description The ability to check who opened your stories after they expire
|
||||||
|
premiumStoryFeaturePermanentViewsHistory = PremiumStoryFeature;
|
||||||
|
|
||||||
|
//@description The ability to set custom expiration duration for stories
|
||||||
|
premiumStoryFeatureCustomExpirationDuration = PremiumStoryFeature;
|
||||||
|
|
||||||
|
//@description The ability to save other's unprotected stories
|
||||||
|
premiumStoryFeatureSaveStories = PremiumStoryFeature;
|
||||||
|
|
||||||
|
//@description The ability to use links and formatting in story caption
|
||||||
|
premiumStoryFeatureLinksAndFormatting = PremiumStoryFeature;
|
||||||
|
|
||||||
|
|
||||||
//@description Contains information about a limit, increased for Premium users @type The type of the limit @default_value Default value of the limit @premium_value Value of the limit for Premium users
|
//@description Contains information about a limit, increased for Premium users @type The type of the limit @default_value Default value of the limit @premium_value Value of the limit for Premium users
|
||||||
premiumLimit type:PremiumLimitType default_value:int32 premium_value:int32 = PremiumLimit;
|
premiumLimit type:PremiumLimitType default_value:int32 premium_value:int32 = PremiumLimit;
|
||||||
|
|
||||||
@ -4057,6 +4078,9 @@ premiumSourceLimitExceeded limit_type:PremiumLimitType = PremiumSource;
|
|||||||
//@description A user tried to use a Premium feature @feature The used feature
|
//@description A user tried to use a Premium feature @feature The used feature
|
||||||
premiumSourceFeature feature:PremiumFeature = PremiumSource;
|
premiumSourceFeature feature:PremiumFeature = PremiumSource;
|
||||||
|
|
||||||
|
//@description A user tried to use a Premium story feature @feature The used feature
|
||||||
|
premiumSourceStoryFeature feature:PremiumStoryFeature = PremiumSource;
|
||||||
|
|
||||||
//@description A user opened an internal link of the type internalLinkTypePremiumFeatures @referrer The referrer from the link
|
//@description A user opened an internal link of the type internalLinkTypePremiumFeatures @referrer The referrer from the link
|
||||||
premiumSourceLink referrer:string = PremiumSource;
|
premiumSourceLink referrer:string = PremiumSource;
|
||||||
|
|
||||||
|
@ -400,6 +400,30 @@ static string get_premium_source(const td_api::PremiumFeature *feature) {
|
|||||||
return string();
|
return string();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static string get_premium_source(const td_api::PremiumStoryFeature *feature) {
|
||||||
|
if (feature == nullptr) {
|
||||||
|
return string();
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (feature->get_id()) {
|
||||||
|
case td_api::premiumStoryFeaturePriorityOrder::ID:
|
||||||
|
return "stories__priority_order";
|
||||||
|
case td_api::premiumStoryFeatureStealthMode::ID:
|
||||||
|
return "stories__stealth_mode";
|
||||||
|
case td_api::premiumStoryFeaturePermanentViewsHistory::ID:
|
||||||
|
return "stories__permanent_views_history";
|
||||||
|
case td_api::premiumStoryFeatureCustomExpirationDuration::ID:
|
||||||
|
return "stories__expiration_durations";
|
||||||
|
case td_api::premiumStoryFeatureSaveStories::ID:
|
||||||
|
return "stories__save_stories_to_gallery";
|
||||||
|
case td_api::premiumStoryFeatureLinksAndFormatting::ID:
|
||||||
|
return "stories__links_and_formatting";
|
||||||
|
default:
|
||||||
|
UNREACHABLE();
|
||||||
|
return string();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static string get_premium_source(const td_api::object_ptr<td_api::PremiumSource> &source) {
|
static string get_premium_source(const td_api::object_ptr<td_api::PremiumSource> &source) {
|
||||||
if (source == nullptr) {
|
if (source == nullptr) {
|
||||||
return string();
|
return string();
|
||||||
@ -413,6 +437,10 @@ static string get_premium_source(const td_api::object_ptr<td_api::PremiumSource>
|
|||||||
auto *feature = static_cast<const td_api::premiumSourceFeature *>(source.get())->feature_.get();
|
auto *feature = static_cast<const td_api::premiumSourceFeature *>(source.get())->feature_.get();
|
||||||
return get_premium_source(feature);
|
return get_premium_source(feature);
|
||||||
}
|
}
|
||||||
|
case td_api::premiumSourceStoryFeature::ID: {
|
||||||
|
auto *feature = static_cast<const td_api::premiumSourceStoryFeature *>(source.get())->feature_.get();
|
||||||
|
return get_premium_source(feature);
|
||||||
|
}
|
||||||
case td_api::premiumSourceLink::ID: {
|
case td_api::premiumSourceLink::ID: {
|
||||||
auto &referrer = static_cast<const td_api::premiumSourceLink *>(source.get())->referrer_;
|
auto &referrer = static_cast<const td_api::premiumSourceLink *>(source.get())->referrer_;
|
||||||
if (referrer.empty()) {
|
if (referrer.empty()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user