diff --git a/CHANGELOG.md b/CHANGELOG.md index fa1bb419..ce7be0c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `ApiError::TooMuchInlineQueryResults` ([#135][pr135]) - `ApiError::NotEnoughRightsToChangeChatPermissions` ([#155][pr155]) - Support for 5.4 telegram bot API ([#133][pr133]) -- Support for 5.5 telegram bot API ([#143][pr143]) +- Support for 5.5 telegram bot API ([#143][pr143], [#164][pr164]) - `EditedMessageIsTooLong` error ([#109][pr109]) - `UntilDate` enum and use it for `{Restricted, Banned}::until_date` ([#116][pr116]) - `Limits::messages_per_min_channel` ([#121][pr121]) @@ -29,6 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [pr143]: https://github.com/teloxide/teloxide-core/pull/143 [pr151]: https://github.com/teloxide/teloxide-core/pull/151 [pr155]: https://github.com/teloxide/teloxide-core/pull/155 +[pr164]: https://github.com/teloxide/teloxide-core/pull/164 ### Changed diff --git a/src/types/chat.rs b/src/types/chat.rs index e46f06ae..92a91516 100644 --- a/src/types/chat.rs +++ b/src/types/chat.rs @@ -34,6 +34,12 @@ pub struct Chat { /// /// [`GetChat`]: crate::payloads::GetChat pub message_auto_delete_time: Option, + + /// `true`, if messages from the chat can't be forwarded to other chats. + /// Returned only in [`GetChat`]. + /// + /// [`GetChat`]: crate::payloads::GetChat + pub has_protected_content: Option, } #[serde_with_macros::skip_serializing_none] @@ -97,7 +103,7 @@ pub struct ChatPrivate { pub bio: Option, /// `True`, if privacy settings of the other party in the private chat - /// allows to use tg://user?id= links only in chats with the + /// allows to use `tg://user?id=` links only in chats with the /// user. Returned only in [`GetChat`]. /// /// [`GetChat`]: crate::payloads::GetChat @@ -450,6 +456,7 @@ mod tests { photo: None, pinned_message: None, message_auto_delete_time: None, + has_protected_content: None, }; let actual = from_str(r#"{"id":-1,"type":"channel","username":"channelname"}"#).unwrap(); assert_eq!(expected, actual); @@ -471,6 +478,7 @@ mod tests { photo: None, pinned_message: None, message_auto_delete_time: None, + has_protected_content: None, }, from_str(r#"{"id":0,"type":"private","username":"username","first_name":"Anon"}"#) .unwrap() diff --git a/src/types/message.rs b/src/types/message.rs index 93d44aed..8951f1f1 100644 --- a/src/types/message.rs +++ b/src/types/message.rs @@ -1343,6 +1343,7 @@ mod tests { photo: None, pinned_message: None, message_auto_delete_time: None, + has_protected_content: None, }; assert!(message.from().unwrap().is_anonymous()); diff --git a/src/types/update.rs b/src/types/update.rs index bfaa7aed..f00be127 100644 --- a/src/types/update.rs +++ b/src/types/update.rs @@ -198,6 +198,7 @@ mod test { photo: None, pinned_message: None, message_auto_delete_time: None, + has_protected_content: None, }, kind: MessageKind::Common(MessageCommon { from: Some(User {