mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-22 22:46:39 +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 {
|
impl Message {
|
||||||
fn text(&self) -> Option<&str> {
|
fn text(&self) -> Option<&str> {
|
||||||
if let MessageKind::CommonMessage {
|
if let MessageKind::Common {
|
||||||
media_kind: MediaKind::Text {
|
media_kind: MediaKind::Text {
|
||||||
ref text, ..
|
ref text, ..
|
||||||
}, .. } = self.kind {
|
}, .. } = self.kind {
|
||||||
|
@ -30,7 +30,7 @@ impl Message {
|
||||||
#[derive(Debug, Deserialize, PartialEq, Clone)]
|
#[derive(Debug, Deserialize, PartialEq, Clone)]
|
||||||
#[serde(untagged)]
|
#[serde(untagged)]
|
||||||
pub enum MessageKind {
|
pub enum MessageKind {
|
||||||
CommonMessage {
|
Common {
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
from: Sender,
|
from: Sender,
|
||||||
#[serde(flatten)]
|
#[serde(flatten)]
|
||||||
|
@ -68,8 +68,8 @@ pub enum MessageKind {
|
||||||
migrate_to_chat_id: i64,
|
migrate_to_chat_id: i64,
|
||||||
migrate_from_chat_id: i64,
|
migrate_from_chat_id: i64,
|
||||||
},
|
},
|
||||||
PinnedMessage {
|
Pinned {
|
||||||
pinned_message: Box<Message>,
|
pinned: Box<Message>,
|
||||||
},
|
},
|
||||||
Invoice {
|
Invoice {
|
||||||
invoice: Invoice,
|
invoice: Invoice,
|
||||||
|
|
Loading…
Reference in a new issue