Add sender_boost_count field to MessageCommon struct

This commit is contained in:
Andrey Brusnik 2024-07-20 18:03:22 +04:00
parent 109454ed84
commit 4905758a78
No known key found for this signature in database
GPG key ID: D33232F28CFF442C
2 changed files with 5 additions and 0 deletions

View file

@ -128,6 +128,10 @@ pub struct MessageCommon {
/// the message /// the message
pub quote: Option<TextQuote>, pub quote: Option<TextQuote>,
/// If the sender of the message boosted the chat, the number of boosts
/// added by the user
pub sender_boost_count: Option<u16>,
/// Date the message was last edited in Unix time. /// Date the message was last edited in Unix time.
#[serde(default, with = "crate::types::serde_opt_date_from_unix_timestamp")] #[serde(default, with = "crate::types::serde_opt_date_from_unix_timestamp")]
pub edit_date: Option<DateTime<Utc>>, pub edit_date: Option<DateTime<Utc>>,

View file

@ -548,6 +548,7 @@ mod test {
forward_origin: None, forward_origin: None,
external_reply: None, external_reply: None,
quote: None, quote: None,
sender_boost_count: None,
edit_date: None, edit_date: None,
media_kind: MediaKind::Text(MediaText { media_kind: MediaKind::Text(MediaText {
text: String::from("hello there"), text: String::from("hello there"),