diff --git a/data/web/corefork.telegram.org/api/stories.html b/data/web/corefork.telegram.org/api/stories.html index 86015b0741..3f8696255b 100644 --- a/data/web/corefork.telegram.org/api/stories.html +++ b/data/web/corefork.telegram.org/api/stories.html @@ -129,23 +129,22 @@ Note that if any of the conditions changes in the period between the call to stories.allStories#6efc5e81 flags:# has_more:flags.0?true count:int state:string peer_stories:Vector<PeerStories> chats:Vector<Chat> users:Vector<User> stealth_mode:StoriesStealthMode = stories.AllStories; stories.allStoriesNotModified#1158fe3e flags:# state:string stealth_mode:StoriesStealthMode = stories.AllStories; -inputReplyToStory#15b0f283 user_id:InputUser story_id:int = InputReplyTo; +stories.peerStories#cae68768 stories:PeerStories chats:Vector<Chat> users:Vector<User> = stories.PeerStories; ---functions--- stories.getAllStories#eeb0d625 flags:# next:flags.1?true hidden:flags.2?true state:flags.0?string = stories.AllStories; stories.getStoriesByID#5774ca74 peer:InputPeer id:Vector<int> = stories.Stories; -stories.readStories#a556dac8 peer:InputPeer max_id:int = Vector<int>; - -stories.incrementStoryViews#b2028afb peer:InputPeer id:Vector<int> = Bool; -stories.getStoryViewsList#7ed23c57 flags:# just_contacts:flags.0?true reactions_first:flags.2?true peer:InputPeer q:flags.1?string id:int offset:string limit:int = stories.StoryViewsList; - -stories.getStoriesViews#28e16cc8 peer:InputPeer id:Vector<int> = stories.StoryViews; -stories.exportStoryLink#7b8def20 peer:InputPeer id:int = ExportedStoryLink; -stories.report#1923fa8c peer:InputPeer id:Vector<int> reason:ReportReason message:string = Bool; - stories.getPeerStories#2c4ada50 peer:InputPeer = stories.PeerStories; + +stories.readStories#a556dac8 peer:InputPeer max_id:int = Vector<int>; +stories.incrementStoryViews#b2028afb peer:InputPeer id:Vector<int> = Bool; + + +stories.getStoryViewsList#7ed23c57 flags:# just_contacts:flags.0?true reactions_first:flags.2?true peer:InputPeer q:flags.1?string id:int offset:string limit:int = stories.StoryViewsList; +stories.getStoriesViews#28e16cc8 peer:InputPeer id:Vector<int> = stories.StoryViews; + stories.getAllReadPeerStories#9b5ae7f9 = Updates; stories.getPeerMaxIDs#535983c3 id:Vector<InputPeer> = Vector<int>;

Active stories of contacts and subscribed channels should be shown in the action bar of the homescreen.
@@ -156,13 +155,17 @@ Use stories.getAllStories to fetch t

  • Initially, neither the next or state flags should be set: upon completion of the RPC call, a new state string is returned and should be stored locally, associated either to the main or hidden story list (depending on the value of hidden we passed); pass the locally stored state to all future calls of the method.
  • If more stories are available, the returned stories.allStories.has_more flag will be set: in this case, the client should re-call the method with the newly returned state and the next flag set to fetch a new state and the remaining stories from the chosen story list; the process should be repeated until no more stories are available (has_more will not be set).
  • -

    Once the full story list is fetched, stories.allStories can be called with the stored state without setting the next flag to check for updates in an active story list: if no changes have occurred since our last call, stories.allStoriesNotModified is returned, otherwise stories.allStories is returned (possibly requiring further pagination as described above).

    +

    Once the full story list is fetched, stories.allStories can be called with the stored state without setting the next flag to check for updates in an active story list: if no changes have occurred since our last call, stories.allStoriesNotModified is returned, otherwise stories.allStories is returned (possibly requiring further pagination as described above).
    +Note that a change is currently only defined as an addition or removal (i.e. by moving it to the hidden list or vice versa) of a peer to/from a story list, not as a new story being posted; those changes are received as simple updateStory updates.

    Changes to the active stories list are contained in the stories.allStories.peer_stories field: this field contains a vector of peerStories constructors, one for each peer, containing the peer ID, the ID of the maximum read story (if any), and a list of StoryItem constructors of type:

    +

    Use stories.readStories to mark all stories up to a certain ID as read, for a given peer.
    +Use stories.incrementStoryViews to actually increment the view counter of stories the user has seen (pass max 200 story IDs at a time).

    +

    Use stories.getPeerStories may also be used to fetch the full active story list of a specific peer.

    Hiding stories of other users

    user#abb5f120 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 flags2:# bot_can_edit:flags2.1?true close_friend:flags2.2?true stories_hidden:flags2.3?true stories_unavailable:flags2.4?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 emoji_status:flags.30?EmojiStatus usernames:flags2.0?Vector<Username> stories_max_id:flags2.5?int = User;
     
    @@ -174,6 +177,35 @@ Use stories.getAllStories to fetch t
     

    Use stories.togglePeerStoriesHidden to hide the active stories of a user, preventing them from being displayed on the action bar on the homescreen.
    When the stories of a user are marked as hidden, the stories_hidden flag is set on the related user constructor, and they should only be visible on the action bar when opening the archive folder, by setting the hidden flag when calling stories.getAllStories, see here for more info.

    Note that the archive folder is the peer folder used for archived chats: hidden stories are displayed there purely due to a UI implementation detail, not because they're actually added to the archive peer folder » or the story archive », which are different things.

    +

    Replying to stories

    +
    inputReplyToStory#15b0f283 user_id:InputUser story_id:int = InputReplyTo;
    +
    +---functions---
    +

    You may reply to stories posted by users by using messages.sendMessage, messages.sendMedia or any other method used to send messages, passing an inputReplyToStory to reply_to, with the ID of the user that posted the story (which must also be the destination peer of the message) and the story ID.

    +

    Reporting stories

    +
    inputReportReasonSpam#58dbcab8 = ReportReason;
    +inputReportReasonViolence#1e22c78d = ReportReason;
    +inputReportReasonPornography#2e59d922 = ReportReason;
    +inputReportReasonChildAbuse#adf44ee3 = ReportReason;
    +inputReportReasonOther#c1e4a2b1 = ReportReason;
    +inputReportReasonCopyright#9b89f93a = ReportReason;
    +inputReportReasonGeoIrrelevant#dbd4feed = ReportReason;
    +inputReportReasonFake#f5ddd6e7 = ReportReason;
    +inputReportReasonIllegalDrugs#a8eb2be = ReportReason;
    +inputReportReasonPersonalDetails#9ec7863d = ReportReason;
    +
    +---functions---
    +
    +stories.report#1923fa8c peer:InputPeer id:Vector<int> reason:ReportReason message:string = Bool;
    +

    Use stories.report to report one or more stories.

    +

    Story links

    +
    exportedStoryLink#3fc9053b link:string = ExportedStoryLink;
    +
    +---functions---
    +
    +stories.exportStoryLink#7b8def20 peer:InputPeer id:int = ExportedStoryLink;
    +

    Use stories.exportStoryLink to generate a story deep link for a specific story.

    +

    Upon encountering a story deep link, clients should open the specified story, see here » for more info on story deep links.

    Media areas

    Schema:

    mediaAreaCoordinates#3d1ea4e x:double y:double w:double h:double rotation:double = MediaAreaCoordinates;
    diff --git a/data/web/corefork.telegram.org/method/stories.incrementStoryViews.html b/data/web/corefork.telegram.org/method/stories.incrementStoryViews.html
    index 16f9b401f3..4c6ec724ad 100644
    --- a/data/web/corefork.telegram.org/method/stories.incrementStoryViews.html
    +++ b/data/web/corefork.telegram.org/method/stories.incrementStoryViews.html
    @@ -77,7 +77,7 @@
     
     id
     Vector<int>
    -IDs of the stories.
    +IDs of the stories (maximum 200 at a time).