mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 14:35:36 +01:00
CommonMessage -> Common, PinnedMessage -> Pinned
This commit is contained in:
parent
84548b0727
commit
2b23136e2f
1 changed files with 4 additions and 4 deletions
|
@ -16,7 +16,7 @@ pub struct Message {
|
|||
|
||||
impl Message {
|
||||
fn text(&self) -> Option<&str> {
|
||||
if let MessageKind::CommonMessage {
|
||||
if let MessageKind::Common {
|
||||
media_kind: MediaKind::Text {
|
||||
ref text, ..
|
||||
}, .. } = self.kind {
|
||||
|
@ -30,7 +30,7 @@ impl Message {
|
|||
#[derive(Debug, Deserialize, PartialEq, Clone)]
|
||||
#[serde(untagged)]
|
||||
pub enum MessageKind {
|
||||
CommonMessage {
|
||||
Common {
|
||||
#[serde(flatten)]
|
||||
from: Sender,
|
||||
#[serde(flatten)]
|
||||
|
@ -68,8 +68,8 @@ pub enum MessageKind {
|
|||
migrate_to_chat_id: i64,
|
||||
migrate_from_chat_id: i64,
|
||||
},
|
||||
PinnedMessage {
|
||||
pinned_message: Box<Message>,
|
||||
Pinned {
|
||||
pinned: Box<Message>,
|
||||
},
|
||||
Invoice {
|
||||
invoice: Invoice,
|
||||
|
|
Loading…
Reference in a new issue