mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-22 06:45:37 +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)
|
`teloxide::dispatching::{update_listeners, repls}` (use `reloxide::{update_listeners, repls}` instead)
|
||||||
- `Dispatcher::setup_ctrlc_handler` (use `enable_ctrlc_handler` on the builder 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)
|
- `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
|
[pr954]: https://github.com/teloxide/teloxide/pull/954
|
||||||
[pr1013]: https://github.com/teloxide/teloxide/pull/1013
|
[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]
|
#[must_use]
|
||||||
pub fn forward(&self) -> Option<&Forward> {
|
pub fn forward(&self) -> Option<&Forward> {
|
||||||
self.common().and_then(|m| m.forward.as_ref())
|
self.common().and_then(|m| m.forward.as_ref())
|
||||||
|
|
|
@ -231,11 +231,6 @@ impl Update {
|
||||||
|
|
||||||
Some(chat)
|
Some(chat)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[deprecated(note = "renamed to `from`", since = "0.10.0")]
|
|
||||||
pub fn user(&self) -> Option<&User> {
|
|
||||||
self.from()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl UpdateId {
|
impl UpdateId {
|
||||||
|
|
Loading…
Add table
Reference in a new issue