mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-03 17:52:12 +01:00
Remove Message::chat_id
, Update::user
This commit is contained in:
parent
f4127325da
commit
6e176113cd
3 changed files with 2 additions and 11 deletions
|
@ -135,6 +135,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
`teloxide::dispatching::{update_listeners, repls}` (use `reloxide::{update_listeners, repls}` instead)
|
||||
- `Dispatcher::setup_ctrlc_handler` (use `enable_ctrlc_handler` on the builder instead)
|
||||
- `BotCommands::ty` and `repls::{commands_repl, commands_repl_with_listener}` (use `CommandsRepl::{repl, repl_with_listener}` instead)
|
||||
- `Message::chat_id` (use `.chat.id`)
|
||||
- `Update::user` (use `Update::from`)
|
||||
|
||||
[pr954]: https://github.com/teloxide/teloxide/pull/954
|
||||
[pr1013]: https://github.com/teloxide/teloxide/pull/1013
|
||||
|
|
|
@ -716,12 +716,6 @@ mod getters {
|
|||
}
|
||||
}
|
||||
|
||||
#[deprecated(since = "0.4.2", note = "use `.chat.id` field instead")]
|
||||
#[must_use]
|
||||
pub fn chat_id(&self) -> ChatId {
|
||||
self.chat.id
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn forward(&self) -> Option<&Forward> {
|
||||
self.common().and_then(|m| m.forward.as_ref())
|
||||
|
|
|
@ -231,11 +231,6 @@ impl Update {
|
|||
|
||||
Some(chat)
|
||||
}
|
||||
|
||||
#[deprecated(note = "renamed to `from`", since = "0.10.0")]
|
||||
pub fn user(&self) -> Option<&User> {
|
||||
self.from()
|
||||
}
|
||||
}
|
||||
|
||||
impl UpdateId {
|
||||
|
|
Loading…
Reference in a new issue