mirror of
https://github.com/teloxide/teloxide.git
synced 2024-10-23 17:36:54 +02:00
Add is_from_offline
field to MessageCommon
struct
This commit is contained in:
parent
ae83ff15a2
commit
8314780959
2 changed files with 9 additions and 3 deletions
|
@ -154,6 +154,11 @@ pub struct MessageCommon {
|
||||||
/// `true`, if the message can't be forwarded.
|
/// `true`, if the message can't be forwarded.
|
||||||
#[serde(default, skip_serializing_if = "std::ops::Not::not")]
|
#[serde(default, skip_serializing_if = "std::ops::Not::not")]
|
||||||
pub has_protected_content: bool,
|
pub has_protected_content: bool,
|
||||||
|
|
||||||
|
/// `true`, if the message was sent by an implicit action, for example, as
|
||||||
|
/// an away or a greeting business message, or as a scheduled message
|
||||||
|
#[serde(default, skip_serializing_if = "std::ops::Not::not")]
|
||||||
|
pub is_from_offline: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[serde_with::skip_serializing_none]
|
#[serde_with::skip_serializing_none]
|
||||||
|
|
|
@ -567,6 +567,7 @@ mod test {
|
||||||
author_signature: None,
|
author_signature: None,
|
||||||
is_automatic_forward: false,
|
is_automatic_forward: false,
|
||||||
has_protected_content: false,
|
has_protected_content: false,
|
||||||
|
is_from_offline: false,
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
@ -589,7 +590,7 @@ mod test {
|
||||||
"from": {
|
"from": {
|
||||||
"first_name": "Wert",
|
"first_name": "Wert",
|
||||||
"id": 6962620676,
|
"id": 6962620676,
|
||||||
"is_bot": false,
|
"is_bot": false,
|
||||||
"username": "WertCrypto"
|
"username": "WertCrypto"
|
||||||
},
|
},
|
||||||
"message_id": 134545,
|
"message_id": 134545,
|
||||||
|
@ -631,7 +632,7 @@ mod test {
|
||||||
"from": {
|
"from": {
|
||||||
"first_name": "the Cable Guy",
|
"first_name": "the Cable Guy",
|
||||||
"id": 5964236329,
|
"id": 5964236329,
|
||||||
"is_bot": false,
|
"is_bot": false,
|
||||||
"language_code":"en",
|
"language_code":"en",
|
||||||
"username": "spacewhaleblues"
|
"username": "spacewhaleblues"
|
||||||
},
|
},
|
||||||
|
@ -648,7 +649,7 @@ mod test {
|
||||||
"from": {
|
"from": {
|
||||||
"first_name": "Wert",
|
"first_name": "Wert",
|
||||||
"id": 6962620676,
|
"id": 6962620676,
|
||||||
"is_bot": false,
|
"is_bot": false,
|
||||||
"username": "WertCrypto"
|
"username": "WertCrypto"
|
||||||
},
|
},
|
||||||
"message_id": 134545,
|
"message_id": 134545,
|
||||||
|
|
Loading…
Reference in a new issue