diff --git a/data/web/corefork.telegram.org/api/links.html b/data/web/corefork.telegram.org/api/links.html index bd87bcb61c..f4f84469bd 100644 --- a/data/web/corefork.telegram.org/api/links.html +++ b/data/web/corefork.telegram.org/api/links.html @@ -365,6 +365,8 @@ tg://addemoji?set=<slug>

Boost links

+

Used by users to boost channels », granting them the ability to post stories.

+

Use the channel information to boost the channel as describere here ».

t.me syntax (public channels):

t.me/<username>?boost

t.me syntax (private channels):

diff --git a/data/web/corefork.telegram.org/api/qr-login.html b/data/web/corefork.telegram.org/api/qr-login.html index a10cf83bd7..c6f2aac020 100644 --- a/data/web/corefork.telegram.org/api/qr-login.html +++ b/data/web/corefork.telegram.org/api/qr-login.html @@ -61,7 +61,7 @@ auth.importLoginToken#95ac5ce4 token:bytes = auth.LoginToken;

Exporting a login token

First of all, auth.exportLoginToken must be called by the app that wants to log in to an existing Telegram account.
-The method will return an auth.loginToken constructor, containing a binary login token and an expiry date (usually 30 seconds).

+The method will return an auth.loginToken constructor, containing a binary login token and an expiration date (usually 30 seconds).

The login token must be encoded using base64url, embedded in a tg://login?token=base64encodedtoken URL and shown in the form of a QR code to the user.
After the expiration of the current QR code, the auth.exportLoginToken method must be recalled and a new QR code must be generated automatically.

Accepting a login token

diff --git a/data/web/corefork.telegram.org/api/stories.html b/data/web/corefork.telegram.org/api/stories.html index c6b3efab2c..608137602d 100644 --- a/data/web/corefork.telegram.org/api/stories.html +++ b/data/web/corefork.telegram.org/api/stories.html @@ -46,6 +46,25 @@

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

Posting stories

+

Schema:

+
inputPeerSelf#7da07ec9 = InputPeer;
+inputPeerChannel#27bcbbfc channel_id:long access_hash:long = InputPeer;
+
+boolFalse#bc799737 = Bool;
+boolTrue#997275b5 = Bool;
+
+---functions---
+
+stories.canSendStory#c7dfdfdd peer:InputPeer = Bool;
+stories.sendStory#bcb73644 flags:# pinned:flags.2?true noforwards:flags.4?true peer:InputPeer media:InputMedia media_areas:flags.5?Vector<MediaArea> caption:flags.0?string entities:flags.1?Vector<MessageEntity> privacy_rules:Vector<InputPrivacyRule> random_id:long period:flags.3?int = Updates;
+stories.editStory#b583ba46 flags:# peer:InputPeer id:int media:flags.0?InputMedia media_areas:flags.3?Vector<MediaArea> caption:flags.1?string entities:flags.1?Vector<MessageEntity> privacy_rules:flags.2?Vector<InputPrivacyRule> = Updates;
+stories.deleteStories#ae59db5f peer:InputPeer id:Vector<int> = Vector<int>;
+

Before posting a story, clients should invoke stories.canSendStory, to make sure

+

This methods returns boolTrue only if:

+

Stealth mode

Premium users may enable stealth mode, erasing their views from any stories they opened in the past stories_stealth_past_period seconds », and hiding their views on stories for the next stories_stealth_future_period seconds », as specified by the client configuration ».

Schema:

@@ -62,7 +81,51 @@ + +

Channel stories

+

Telegram users can grant their favorite channels the ability to post stories by giving them boosts. Telegram Premium now includes one boost that can be assigned to any channel.

+

Boosts

+

Channels level up as they gain more boosts – and for each level, they can post 1 additional story per day to their subscribers' story feeds.

+

Schema:

+
stories.canApplyBoostOk#c3173587 = stories.CanApplyBoostResult;
+stories.canApplyBoostReplace#712c4655 current_boost:Peer chats:Vector<Chat> = stories.CanApplyBoostResult;
+
+statsPercentValue#cbce2fe0 part:double total:double = StatsPercentValue;
+stories.boostsStatus#66ea1fef flags:# my_boost:flags.2?true level:int current_level_boosts:int boosts:int next_level_boosts:flags.0?int premium_audience:flags.1?StatsPercentValue = stories.BoostsStatus;
+
+booster#e9e6380 user_id:long expires:int = Booster;
+
+stories.boostersList#f3dd3d1d flags:# count:int boosters:Vector<Booster> next_offset:flags.0?string users:Vector<User> = stories.BoostersList;
+
+---functions---
+
+stories.canApplyBoost#db05c1bd peer:InputPeer = stories.CanApplyBoostResult;
+stories.applyBoost#f29d7c2b peer:InputPeer = Bool;
+
+stories.getBoostsStatus#4c449472 peer:InputPeer = stories.BoostsStatus;
+
+stories.getBoostersList#337ef980 peer:InputPeer offset:string limit:int = stories.BoostersList;
+

Use stories.applyBoost to boost a channel: before invoking this method, however, make sure to invoke stories.canApplyBoost to check if a given channel can be boosted.

+

A PREMIUM_ACCOUNT_REQUIRED error will be returned when calling any of the two methods if the current account does not have a Telegram Premium subscription.
+A BOOST_NOT_MODIFIED RPC error will be returned when calling any of the two methods if the user is already boosting the specified channel.

+

Furthermore, the result of stories.canApplyBoost can be:

+ +

After boosting a channel, the user may not change their boosted channel for a certain cooldown period: if the cooldown period isn't over yet, calls to any of the two methods will return a 420 FLOOD_WAIT_X error, indicating the number of seconds left before a different channel can be boosted.

+

Users may also invoke stories.getBoostsStatus, to get the current boost status of a channel as a stories.boostsStatus constructor, check out the constructor page for more info.

+

Channel administrators may invoke stories.getBoostersList to fetch the list of users currently boosting the channel.

+

Posting stories as a channel

+
inputPeerChannel#27bcbbfc channel_id:long access_hash:long = InputPeer;
+
+---functions---
+
+stories.canSendStory#c7dfdfdd peer:InputPeer = Bool;
+stories.sendStory#bcb73644 flags:# pinned:flags.2?true noforwards:flags.4?true peer:InputPeer media:InputMedia media_areas:flags.5?Vector<MediaArea> caption:flags.0?string entities:flags.1?Vector<MessageEntity> privacy_rules:Vector<InputPrivacyRule> random_id:long period:flags.3?int = Updates;
+stories.editStory#b583ba46 flags:# peer:InputPeer id:int media:flags.0?InputMedia media_areas:flags.3?Vector<MediaArea> caption:flags.1?string entities:flags.1?Vector<MessageEntity> privacy_rules:flags.2?Vector<InputPrivacyRule> = Updates;
+stories.deleteStories#ae59db5f peer:InputPeer id:Vector<int> = Vector<int>;
+

Everything works exactly the same as when posting stories as a user, with the only difference that clients should pass the appropriate inputPeerChannel instead of inputPeerSelf to stories.canSendStory, stories.sendStory and all the other story methods, see the main documentation » for more info.

diff --git a/data/web/corefork.telegram.org/constructor/booster.html b/data/web/corefork.telegram.org/constructor/booster.html index bd5a7b05f0..0339c5ce68 100644 --- a/data/web/corefork.telegram.org/constructor/booster.html +++ b/data/web/corefork.telegram.org/constructor/booster.html @@ -4,32 +4,10 @@ booster - + - + @@ -64,7 +42,8 @@ Booster">

booster

-

+

Info about a boost made by a specific user.

+

+

Booster

+

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/stories.boostsStatus b/data/web/corefork.telegram.org/constructor/stories.boostsStatus index 4cc2aa7831..6577966ddc 100644 --- a/data/web/corefork.telegram.org/constructor/stories.boostsStatus +++ b/data/web/corefork.telegram.org/constructor/stories.boostsStatus @@ -4,36 +4,10 @@ stories.boostsStatus - + - + @@ -68,7 +42,8 @@ current_level_boosts…">

stories.boostsStatus

-

+

The current boost status » of a channel.

+

+

stories.BoostsStatus

+

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/stories.canApplyBoostOk b/data/web/corefork.telegram.org/constructor/stories.canApplyBoostOk index 110c30c473..e80086bcab 100644 --- a/data/web/corefork.telegram.org/constructor/stories.canApplyBoostOk +++ b/data/web/corefork.telegram.org/constructor/stories.canApplyBoostOk @@ -4,16 +4,10 @@ stories.canApplyBoostOk - + - + @@ -48,7 +42,8 @@ stories.CanApplyBoostResult">

stories.canApplyBoostOk

-

+

We're not boosting any channel, and we can freely boost the specified channel.

+