vaegram 0.2.0

Telegram MTProto client library for users and bots
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::Client;
use crate::errors::Result;
use crate::raw::functions;
use crate::types::PeerRef;

impl Client {
    /// Marks a chat's stories up to and including `max_id` as read.
    ///
    /// Returns the ids that were marked.
    pub async fn read_stories(&self, chat_id: impl Into<PeerRef>, max_id: i32) -> Result<Vec<i32>> {
        let peer = self.resolve_peer(chat_id).await?;
        self.invoke(&functions::stories::ReadStories { peer, max_id }).await
    }
}