pub async fn toggle_chat_is_pinned(
chat_list: ChatList,
chat_id: i64,
is_pinned: bool,
client_id: i32,
) -> Result<(), Error>Expand description
Changes the pinned state of a chat. There can be up to getOption(“pinned_chat_count_max”)/getOption(“pinned_archived_chat_count_max”) pinned non-secret chats and the same number of secret chats in the main/archive chat list. The limit can be increased with Telegram Premium
§Arguments
chat_list- Chat list in which to change the pinned state of the chatchat_id- Chat identifieris_pinned- Pass true to pin the chat; pass false to unpin itclient_id- The client id to send the request to