mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-14 11:44:04 +01:00
Add missing Chat::message_auto_delete_time
field (tba 5.1)
This commit is contained in:
parent
b55bdd274b
commit
bd52e93cdb
2 changed files with 9 additions and 0 deletions
|
@ -28,6 +28,12 @@ pub struct Chat {
|
|||
///
|
||||
/// [`GetChat`]: crate::payloads::GetChat
|
||||
pub pinned_message: Option<Box<Message>>,
|
||||
|
||||
/// The time after which all messages sent to the chat will be automatically
|
||||
/// deleted; in seconds. Returned only in [`GetChat`].
|
||||
///
|
||||
/// [`GetChat`]: crate::payloads::GetChat
|
||||
pub message_auto_delete_time: Option<u32>,
|
||||
}
|
||||
|
||||
#[serde_with_macros::skip_serializing_none]
|
||||
|
@ -424,6 +430,7 @@ mod tests {
|
|||
}),
|
||||
photo: None,
|
||||
pinned_message: None,
|
||||
message_auto_delete_time: None,
|
||||
};
|
||||
let actual = from_str(r#"{"id":-1,"type":"channel","username":"channelname"}"#).unwrap();
|
||||
assert_eq!(expected, actual);
|
||||
|
@ -443,6 +450,7 @@ mod tests {
|
|||
}),
|
||||
photo: None,
|
||||
pinned_message: None,
|
||||
message_auto_delete_time: None,
|
||||
},
|
||||
from_str(r#"{"id":0,"type":"private","username":"username","first_name":"Anon"}"#)
|
||||
.unwrap()
|
||||
|
|
|
@ -186,6 +186,7 @@ mod test {
|
|||
}),
|
||||
photo: None,
|
||||
pinned_message: None,
|
||||
message_auto_delete_time: None,
|
||||
},
|
||||
kind: MessageKind::Common(MessageCommon {
|
||||
from: Some(User {
|
||||
|
|
Loading…
Add table
Reference in a new issue