From 6bf204221f0217b86df26d566fbde1147247d57b Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Thu, 17 Feb 2022 14:41:38 +0300 Subject: [PATCH] Deprecate `Message::chat_id` --- CHANGELOG.md | 6 ++++++ src/types/message.rs | 1 + 2 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 922aed70..bb11fc35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## unreleased +### Deprecated + +- `Message::chat_id` use `.chat.id` field instead ([#182][pr182]) + +[pr182]: https://github.com/teloxide/teloxide-core/pull/182 + ### Fixed - Serialization of `SendPoll::type_` (it's now possible to send quiz polls) ([#181][pr181]) diff --git a/src/types/message.rs b/src/types/message.rs index 454d721f..b7d58e88 100644 --- a/src/types/message.rs +++ b/src/types/message.rs @@ -557,6 +557,7 @@ mod getters { } } + #[deprecated(since = "0.4.2", note = "use `.chat.id` field instead")] pub fn chat_id(&self) -> i64 { self.chat.id }