diff --git a/crates/teloxide-core/src/types/message.rs b/crates/teloxide-core/src/types/message.rs index 9a749ea9..7f1a8554 100644 --- a/crates/teloxide-core/src/types/message.rs +++ b/crates/teloxide-core/src/types/message.rs @@ -154,6 +154,11 @@ pub struct MessageCommon { /// `true`, if the message can't be forwarded. #[serde(default, skip_serializing_if = "std::ops::Not::not")] 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] diff --git a/crates/teloxide-core/src/types/update.rs b/crates/teloxide-core/src/types/update.rs index d806f1cf..2a36763a 100644 --- a/crates/teloxide-core/src/types/update.rs +++ b/crates/teloxide-core/src/types/update.rs @@ -567,6 +567,7 @@ mod test { author_signature: None, is_automatic_forward: false, has_protected_content: false, + is_from_offline: false, }), }), }; @@ -589,7 +590,7 @@ mod test { "from": { "first_name": "Wert", "id": 6962620676, - "is_bot": false, + "is_bot": false, "username": "WertCrypto" }, "message_id": 134545, @@ -631,7 +632,7 @@ mod test { "from": { "first_name": "the Cable Guy", "id": 5964236329, - "is_bot": false, + "is_bot": false, "language_code":"en", "username": "spacewhaleblues" }, @@ -648,7 +649,7 @@ mod test { "from": { "first_name": "Wert", "id": 6962620676, - "is_bot": false, + "is_bot": false, "username": "WertCrypto" }, "message_id": 134545,