telers/types/chat_shared.rs
1use super::PhotoSize;
2
3use serde::{Deserialize, Serialize};
4use serde_with::skip_serializing_none;
5
6/// This object contains information about a chat that was shared with the bot using a [`KeyboardButtonRequestChat`](crate::types::KeyboardButtonRequestChat) button.
7/// # Documentation
8/// <https://core.telegram.org/bots/api#chatshared>
9#[skip_serializing_none]
10#[derive(Debug, Clone, Hash, PartialEq, Eq, Deserialize, Serialize)]
11pub struct ChatShared {
12 /// Identifier of the request
13 pub request_id: i64,
14 /// Identifier of the shared chat. This number may have more than 32 significant bits and some programming languages may have difficulty/silent defects in interpreting it. But it has at most 52 significant bits, so a 64-bit integer or double-precision float type are safe for storing this identifier. The bot may not have access to the chat and could be unable to use this identifier, unless the chat is already known to the bot by some other means.
15 pub chat_id: i64,
16 /// Title of the chat, if the title was requested by the bot.
17 pub title: Option<Box<str>>,
18 /// Username of the chat, if the username was requested by the bot and available.
19 pub username: Option<Box<str>>,
20 /// Available sizes of the chat photo, if the photo was requested by the bot
21 pub photo: Option<Box<[PhotoSize]>>,
22}