diff --git a/data/web/corefork.telegram.org/api/sponsored-messages.html b/data/web/corefork.telegram.org/api/sponsored-messages.html index da76c95c73..e978fa640c 100644 --- a/data/web/corefork.telegram.org/api/sponsored-messages.html +++ b/data/web/corefork.telegram.org/api/sponsored-messages.html @@ -5,11 +5,11 @@ Sponsored messages +sponsoredWebPage#3db8ec63 flags:# url:string site_name:string photo:flags.0?Photo = SponsoredWebPage;…"> +sponsoredWebPage#3db8ec63 flags:# url:string site_name:string photo:flags.0?Photo = SponsoredWebPage;…"> @@ -45,13 +45,17 @@ sponsoredMessage#daafff6b flags:# recommended:flags.5?true show_peer_photo:flags

Sponsored messages

Related TL schema:

-
sponsoredMessage#daafff6b flags:# recommended:flags.5?true show_peer_photo:flags.6?true random_id:bytes from_id:flags.3?Peer chat_invite:flags.4?ChatInvite chat_invite_hash:flags.4?string channel_post:flags.2?int start_param:flags.0?string webpage:flags.9?SponsoredWebPage message:string entities:flags.1?Vector<MessageEntity> sponsor_info:flags.7?string additional_info:flags.8?string = SponsoredMessage;
+
sponsoredWebPage#3db8ec63 flags:# url:string site_name:string photo:flags.0?Photo = SponsoredWebPage;
+
+sponsoredMessage#daafff6b flags:# recommended:flags.5?true show_peer_photo:flags.6?true random_id:bytes from_id:flags.3?Peer chat_invite:flags.4?ChatInvite chat_invite_hash:flags.4?string channel_post:flags.2?int start_param:flags.0?string webpage:flags.9?SponsoredWebPage message:string entities:flags.1?Vector<MessageEntity> sponsor_info:flags.7?string additional_info:flags.8?string = SponsoredMessage;
+
 messages.sponsoredMessages#c9ee1d87 flags:# posts_between:flags.0?int messages:Vector<SponsoredMessage> chats:Vector<Chat> users:Vector<User> = messages.SponsoredMessages;
 
 ---functions---
 
 channels.getSponsoredMessages#ec210fbf channel:InputChannel = messages.SponsoredMessages;
-channels.viewSponsoredMessage#beaedb94 channel:InputChannel random_id:bytes = Bool;
+channels.viewSponsoredMessage#beaedb94 channel:InputChannel random_id:bytes = Bool; +channels.clickSponsoredMessage#18afbc93 channel:InputChannel random_id:bytes = Bool;

Getting sponsored messages

Each time the user opens a channel, channels.getSponsoredMessages must be called to receive sponsored messages available for this channel. The result must be cached for 5 minutes.

@@ -66,9 +70,18 @@ sponsoredMessage#daafff6b flags:# recommended:flags.5?true show_peer_photo:flags

The message should be marked as "Recommended" instead of "Sponsored" if the recommended flag is set.

If the show_peer_photo flag is set, a profile photo bubble should be displayed for this message, like for messages sent in groups. The photo shown in the bubble is obtained either from the peer contained in from_id, or from chat_invite.

+

If the webpage flag is set, an instant view webpage preview must also be shown for the specified website.

If the sponsor_info or additional_info flags are set, an additional "Sponsor info" menu item must be present in the message context menu (the menu that pops up when clicking on a button), that when clicked, displays the contents of the flags.

Counting sponsored message views

-

Once the entire text is shown on the screen (excluding the button), channels.viewSponsoredMessage must be called with the random_id of this sponsored message.

+

Once the entire text is shown on the screen (excluding the button), channels.viewSponsoredMessage must be called with the random_id of the sponsored message.

+

Clicking on sponsored messages

+

If the user either:

+ +

channels.clickSponsoredMessage must be called with the random_id of the sponsored message.

Testing sponsored messages

For the channel https://t.me/SecretAdTestChannel the system will always return a sponsored message: promoting either a channel, a particular message in a channel, or a bot with a start parameter.


diff --git a/data/web/corefork.telegram.org/constructor/autoDownloadSettings.html b/data/web/corefork.telegram.org/constructor/autoDownloadSettings.html index 511020fcc6..fb37c04e7e 100644 --- a/data/web/corefork.telegram.org/constructor/autoDownloadSettings.html +++ b/data/web/corefork.telegram.org/constructor/autoDownloadSettings.html @@ -94,7 +94,7 @@ stories_preload flags.4?true -  +Whether to preload stories; in particular, the first documentAttributeVideo.preload_prefix_size bytes of story videos should be preloaded. photo_size_max @@ -129,7 +129,12 @@

Type

-

AutoDownloadSettings

+

AutoDownloadSettings

+

Related pages

+

Stories

+

Telegram users and channels can easily post and view stories through the API.

+

documentAttributeVideo

+

Defines a video

diff --git a/data/web/corefork.telegram.org/constructor/documentAttributeVideo.html b/data/web/corefork.telegram.org/constructor/documentAttributeVideo.html index 957dd8191a..d9fe711fbc 100644 --- a/data/web/corefork.telegram.org/constructor/documentAttributeVideo.html +++ b/data/web/corefork.telegram.org/constructor/documentAttributeVideo.html @@ -84,7 +84,7 @@ nosound flags.3?true -  +Whether the specified document is a video file with no audio tracks (a GIF animation (even as MPEG4), for example) duration @@ -104,12 +104,15 @@ preload_prefix_size flags.2?int -  +Number of bytes to preload when preloading videos (particularly video stories).

Type

-

DocumentAttribute

+

DocumentAttribute

+

Related pages

+

Stories

+

Telegram users and channels can easily post and view stories through the API.

diff --git a/data/web/corefork.telegram.org/constructor/globalPrivacySettings.html b/data/web/corefork.telegram.org/constructor/globalPrivacySettings.html index 8c1adf580e..7f3bc42669 100644 --- a/data/web/corefork.telegram.org/constructor/globalPrivacySettings.html +++ b/data/web/corefork.telegram.org/constructor/globalPrivacySettings.html @@ -79,17 +79,20 @@ keep_archived_unmuted flags.1?true -  +Whether unmuted chats will be kept in the Archive chat list when they get a new message. keep_archived_folders flags.2?true -  +Whether unmuted chats that are always included or pinned in a folder, will be kept in the Archive chat list when they get a new message. Ignored if keep_archived_unmuted is set.

Type

-

GlobalPrivacySettings

+

GlobalPrivacySettings

+

Related pages

+

Folders

+

Telegram allows placing chats into folders, based on their type, mute status, or other custom criteria, thanks to folder blacklists and whitelists.

diff --git a/data/web/corefork.telegram.org/constructor/inputPeerNotifySettings.html b/data/web/corefork.telegram.org/constructor/inputPeerNotifySettings.html index 5c266519a2..bb683be82c 100644 --- a/data/web/corefork.telegram.org/constructor/inputPeerNotifySettings.html +++ b/data/web/corefork.telegram.org/constructor/inputPeerNotifySettings.html @@ -89,22 +89,22 @@ sound flags.3?NotificationSound -Name of an audio file for notification +Identifier of an audio file to play for notifications. stories_muted flags.6?Bool -  +Whether story notifications should be disabled. stories_hide_sender flags.7?Bool -  +Whether the sender name should be displayed in story notifications. stories_sound flags.8?NotificationSound -  +Identifier of an audio file to play for story notifications. diff --git a/data/web/corefork.telegram.org/constructor/peerNotifySettings.html b/data/web/corefork.telegram.org/constructor/peerNotifySettings.html index 3a3f69a700..5d3bf6a701 100644 --- a/data/web/corefork.telegram.org/constructor/peerNotifySettings.html +++ b/data/web/corefork.telegram.org/constructor/peerNotifySettings.html @@ -104,27 +104,27 @@ stories_muted flags.6?Bool -  +Whether story notifications should be disabled. stories_hide_sender flags.7?Bool -  +Whether the sender name should be displayed in story notifications. stories_ios_sound flags.8?NotificationSound -  +Sound for story notifications on the official iOS application stories_android_sound flags.9?NotificationSound -  +Sound for story notifications on the official Android application stories_other_sound flags.10?NotificationSound -  +Sound for story notifications on other applications diff --git a/data/web/corefork.telegram.org/constructor/sponsoredMessage.html b/data/web/corefork.telegram.org/constructor/sponsoredMessage.html index 36af2f8981..6f633fd3b4 100644 --- a/data/web/corefork.telegram.org/constructor/sponsoredMessage.html +++ b/data/web/corefork.telegram.org/constructor/sponsoredMessage.html @@ -114,7 +114,7 @@ webpage flags.9?SponsoredWebPage -  +Sponsored website message diff --git a/data/web/corefork.telegram.org/constructor/updateMessagePollVote.html b/data/web/corefork.telegram.org/constructor/updateMessagePollVote.html index 64fbad5a7f..861ef7f6d8 100644 --- a/data/web/corefork.telegram.org/constructor/updateMessagePollVote.html +++ b/data/web/corefork.telegram.org/constructor/updateMessagePollVote.html @@ -4,10 +4,10 @@ updateMessagePollVote - + - + @@ -42,7 +42,7 @@

updateMessagePollVote

-

A specific user has voted in a poll

+

A specific peer has voted in a poll