From 61b9339682f54ac9bd7ec649702c5b84dfda9cdd Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 9 Sep 2022 15:14:56 +0000 Subject: [PATCH] Update content of files --- .../corefork.telegram.org/api/premium.html | 68 ++++++++++--------- 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/data/web/corefork.telegram.org/api/premium.html b/data/web/corefork.telegram.org/api/premium.html index 4811360dff..e1f2bee1bc 100644 --- a/data/web/corefork.telegram.org/api/premium.html +++ b/data/web/corefork.telegram.org/api/premium.html @@ -48,16 +48,22 @@

This page describes how should client apps handle Premium features: for a user-friendly overview of Telegram Premium features, see the Telegram Premium FAQ.

-

Telegram Premium features

+

Telegram Premium users

inputUserSelf#f7c1b13f = InputUser;
 
 user#3ff6ecb0 flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true min:flags.20?true bot_inline_geo:flags.21?true support:flags.23?true scam:flags.24?true apply_min_photo:flags.25?true fake:flags.26?true bot_attach_menu:flags.27?true premium:flags.28?true attach_menu_enabled:flags.29?true id:long access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restriction_reason:flags.18?Vector<RestrictionReason> bot_inline_placeholder:flags.19?string lang_code:flags.22?string = User;
 
+help.premiumPromo#8a4f3c29 status_text:string status_entities:Vector<MessageEntity> video_sections:Vector<string> videos:Vector<Document> currency:string monthly_amount:long users:Vector<User> = help.PremiumPromo;
+
 ---functions---
 
-users.getUsers#d91a548 id:Vector<InputUser> = Vector<User>;
+users.getUsers#d91a548 id:Vector<InputUser> = Vector<User>; +help.getPremiumPromo#b81b93d4 = help.PremiumPromo; +

Premium users will have the premium flag of the user set.

+

Use users.getUsers with inputUserSelf to fetch info about the current subscription status of the current user.
+You can also directly use help.getPremiumPromo, as it will return info about the current user in the users field.

+

Telegram Premium features

Telegram Premium offers a set of additional features and raised limits: clients should be aware of the current subscription status to accordingly modify client behavior.

-

Use users.getUsers with inputUserSelf to fetch info about the current subscription status from the premium flag of the returned user constructor.

Promo page

help.premiumPromo#8a4f3c29 status_text:string status_entities:Vector<MessageEntity> video_sections:Vector<string> videos:Vector<Document> currency:string monthly_amount:long users:Vector<User> = help.PremiumPromo;
 
@@ -68,35 +74,11 @@
 

Clients should show a Telegram Premium button in the settings.
Clicking on this button in the settings, clicking on the badge of a Premium user or hitting one of the Premium limits listed below should open a Telegram Premium modal.

Call help.getPremiumPromo and help.getAppConfig to fetch info on how to build the premium modal.

-

help.getAppConfig will return a list of Premium features in the premium_promo_order appConfig field, and the modal should contain a row for each feature identifier.

-

The help.premiumPromo constructor returned by help.getPremiumPromo contains the following fields:

+

help.getAppConfig will return a list of Premium feature identifiers in the premium_promo_order appConfig field (array of strings): the modal should contain a row for each returned feature.

+

Possible feature identifiers:

    -
  • status_text+status_entities - The current subscription status (with associated styled text entities), to be shown in the modal header.
  • -
  • video_sections+videos - A list of videos, and the corresponding premium feature identifiers.
    -Equivalent to a section => video dictionary, with keys from video_section and values from videos.
    -The keys in video_sections correspond to a specific feature identifier, and the associated promotional video should be shown when clicking on the associated feature row.
  • -
  • currency - Three-letter ISO 4217 currency code
  • -
  • monthly_amount - Monthly price of the subscription in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
  • -
-
Feature identifiers
-

This list contains the feature identifiers returned in the premium_promo_order appConfig array field.

-

Note that whenever config keys end with a * in the following list, the * should be replaced with default or premium, to fetch the appropriate limit value for normal and Premium users.

-
    -
  • double_limits - Clicking on this entry should open a secondary popup with a list of the following improved Premium limits.
    -What follows is a list of appConfig integer config parameters, containing the non-Premium (default) and the Premium (premium) limit.
      -
    • channels_limit_* - The maximum number of channels and supergroups a user may join
    • -
    • saved_gifs_limit_* - The maximum number of GIFs a user may save
    • -
    • stickers_faved_limit_* - The maximum number of stickers a user may add to favorites »
    • -
    • dialog_filters_limit_* - The maximum number of folders a user may create
    • -
    • dialog_filters_chats_* - The maximum number of chats a user may add to a folder
    • -
    • dialogs_pinned_limit_* - The maximum number of chats a user may pin
    • -
    • dialogs_folder_pinned_limit_* - The maximum number of chats a user may pin in a folder
    • -
    • channels_public_limit_* - The maximum number of public channels or supergroups a user may create
    • -
    • caption_length_limit_* - The maximum UTF-8 length of media captions
    • -
    • about_length_limit_* - The maximum UTF-8 length of user bios
    • -
    -
  • -
  • more_upload - Premium users can upload bigger files, as specified by the upload_max_fileparts_* config keys (integer, indicates the number of 512kb file parts, so the size in bytes is determined by multiplying by 524288)
  • +
  • double_limits - Clicking on this entry should open a secondary popup with a list of the improved Premium limits ».
  • +
  • more_upload - Premium users can upload bigger files, as specified by the upload_max_fileparts_default vs upload_max_fileparts_premium config keys.
  • faster_download - Premium users have no download speed limits
  • voice_to_text - Premium users can transcribe voice messages
  • no_ads - Premium users see no sponsored messages
  • @@ -108,6 +90,30 @@ What follows is a list of appConfig i
  • animated_userpics - Animated profile pictures of Premium users will play in-chat and when browsing the dialog list
  • app_icons - Premium users can change the default icon of the Telegram app
+

The help.premiumPromo constructor returned by help.getPremiumPromo contains the following fields:

+
    +
  • status_text+status_entities - The current subscription status (with associated styled text entities), to be shown in the modal header.
  • +
  • video_sections+videos - A list of videos, and the corresponding premium feature identifiers +Equivalent to a section => video dictionary, with keys from video_section and values from videos.
    +The keys in video_sections correspond to a specific feature identifier, and the associated promotional video should be shown when clicking on the associated feature row.
  • +
  • currency - Three-letter ISO 4217 currency code
  • +
  • monthly_amount - Monthly price of the subscription in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
  • +
+

Premium limits

+

What follows is a list of appConfig integer config parameters.

+

Note that whenever config keys end with a * in the following list, the * should be replaced with default or premium, to fetch the appropriate limit value for normal and Premium users.

+
    +
  • channels_limit_* - The maximum number of channels and supergroups a user may join
  • +
  • saved_gifs_limit_* - The maximum number of GIFs a user may save
  • +
  • stickers_faved_limit_* - The maximum number of stickers a user may add to favorites »
  • +
  • dialog_filters_limit_* - The maximum number of folders a user may create
  • +
  • dialog_filters_chats_* - The maximum number of chats a user may add to a folder
  • +
  • dialogs_pinned_limit_* - The maximum number of chats a user may pin
  • +
  • dialogs_folder_pinned_limit_* - The maximum number of chats a user may pin in a folder
  • +
  • channels_public_limit_* - The maximum number of public channels or supergroups a user may create
  • +
  • caption_length_limit_* - The maximum UTF-8 length of media captions
  • +
  • about_length_limit_* - The maximum UTF-8 length of user bios
  • +

Badge

Users with a Telegram Premium subscription (user.premium is set) should have a Telegram Premium badge next to their name.

Animated profile pictures