remove TargetMessage as ChatOrInlineMessage reexport as it couldn't be deprecated

Also rename `TargetMessage::{Chat => Common}` variant.
(anyway `ChatOrInlineMessage`/`TargetMessage` refactoring is not backward compatible)
This commit is contained in:
Waffle 2020-08-10 18:14:52 +03:00
parent 851e4c6bc6
commit 02400b18ab

View file

@ -6,13 +6,10 @@ use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, Eq, Hash, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum TargetMessage {
Chat { chat_id: ChatId, message_id: i32 },
Common { chat_id: ChatId, message_id: i32 },
Inline { inline_message_id: String },
}
#[deprecated = "Was renamed to `TargetMessage`, please use renamed version"]
pub use TargetMessage as ChatOrInlineMessage;
impl From<String> for TargetMessage {
fn from(inline_message_id: String) -> Self {
Self::Inline { inline_message_id }