stories.readStories
Mark all stories up to a certain ID as read, for a given peer; will emit an updateReadStories update to all logged-in sessions.
func (c *Client) StoriesReadStories(ctx context.Context, request *StoriesReadStoriesRequest) ([]int, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.StoriesReadStories(ctx, &tg.StoriesReadStoriesRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // []int
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Peer | InputPeerClass | yes | The peer whose stories should be marked as read. |
MaxID | int | yes | Mark all stories up to and including this ID as read |
Returns
[]int
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | MAX_ID_INVALID | The provided max ID is invalid. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
| 400 | STORIES_NEVER_CREATED | This peer hasn't ever posted any stories. |
References
- Official documentation
- Generated Go reference
- TL definition:
stories.readStories#a556dac8