diff --git a/crates/teloxide-core/CHANGELOG.md b/crates/teloxide-core/CHANGELOG.md index 0e5c1487..d151d236 100644 --- a/crates/teloxide-core/CHANGELOG.md +++ b/crates/teloxide-core/CHANGELOG.md @@ -14,6 +14,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - The following functions were made `#[must_use]`: - `MaskPoint::{new, point}` - `StickerKind::{premium_animation, mask_position, custom_emoji_id}` +- Replaced `Option` with `bool` for the fields of `Administrator` ([#800][pr800]): + - `can_post_messages` + - `can_edit_messages` + - `can_pin_messages` + - `can_manage_topics` ### Added @@ -21,6 +26,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `ChatMember::can_send_polls` method ([#764][pr764]) [pr764]: https://github.com/teloxide/teloxide/pull/764 +[pr800]: https://github.com/teloxide/teloxide/pull/800 + +### Deprecated + +- `ChatMemberKind` methods ([#800][pr800]): + - `can_change_info` + - `can_invite_users` + - `can_pin_messages` + - `can_send_messages` + - `can_send_media_messages` + - `can_send_other_messages` + - `can_send_polls` + - `can_add_web_page_previews` +- `ChatMemberStatus::is_present` method ([#800][pr800]) + +### Fixed + +- `ChatMemberKind::can_manage_chat` method now correctly returns `false` for non owner/administrator users ## 0.8.0 - 2022-10-03 diff --git a/crates/teloxide-core/src/types/chat_member.rs b/crates/teloxide-core/src/types/chat_member.rs index 29cbe759..0edc7000 100644 --- a/crates/teloxide-core/src/types/chat_member.rs +++ b/crates/teloxide-core/src/types/chat_member.rs @@ -382,7 +382,7 @@ impl ChatMemberKind { /// - is restricted, but does have [`Restricted::can_change_info`] privilege /// Returns `false` otherwise. #[deprecated( - since = "0.8.1", + since = "0.9.0", note = "Match manually and use `can_change_info` field directly. Details: #781" )] #[must_use] @@ -486,7 +486,7 @@ impl ChatMemberKind { /// privilege /// Returns `false` otherwise. #[deprecated( - since = "0.8.1", + since = "0.9.0", note = "Match manually and use `can_invite_users` field directly. Details: #781" )] #[must_use] @@ -529,7 +529,7 @@ impl ChatMemberKind { /// privilege /// Returns `false` otherwise. #[deprecated( - since = "0.8.1", + since = "0.9.0", note = "Match manually and use `can_pin_messages` field directly. Details: #781" )] #[must_use] @@ -552,7 +552,7 @@ impl ChatMemberKind { /// privilege /// Returns `false` otherwise. #[deprecated( - since = "0.8.1", + since = "0.9.0", note = "Match manually and use `can_manage_topics` field directly. Details: #781" )] #[must_use] @@ -601,7 +601,7 @@ impl ChatMemberKind { /// /// [`can_send_messages`]: Restricted::can_send_messages #[deprecated( - since = "0.8.1", + since = "0.9.0", note = "Match manually and use `can_send_messages` field directly. Details: #781" )] #[must_use] @@ -623,7 +623,7 @@ impl ChatMemberKind { /// /// [`can_send_media_messages`]: Restricted::can_send_media_messages #[deprecated( - since = "0.8.1", + since = "0.9.0", note = "Match manually and use `can_send_media_messages` field directly. Details: #781" )] #[must_use] @@ -647,7 +647,7 @@ impl ChatMemberKind { /// /// [`can_send_media_messages`]: Restricted::can_send_media_messages #[deprecated( - since = "0.8.1", + since = "0.9.0", note = "Match manually and use `can_send_other_messages` field directly. Details: #781" )] #[must_use] @@ -671,7 +671,7 @@ impl ChatMemberKind { /// /// [`can_send_media_messages`]: Restricted::can_send_media_messages #[deprecated( - since = "0.8.1", + since = "0.9.0", note = "Match manually and use `can_add_web_page_previews` field directly. Details: #781" )] #[must_use] @@ -694,7 +694,7 @@ impl ChatMemberKind { /// /// [`can_send_polls`]: Restricted::can_send_polls #[deprecated( - since = "0.8.1", + since = "0.9.0", note = "Match manually and use `can_send_polls` field directly. Details: #781" )] #[must_use] @@ -806,7 +806,7 @@ impl ChatMemberStatus { /// [banned]: ChatMemberKind::Banned #[must_use] #[deprecated( - since = "0.8.1", + since = "0.9.0", note = "Use `ChatMemberKind::is_present` method instead. Details: #781" )] pub fn is_present(&self) -> bool {