Add is_from_offline field to MessageCommon struct

This commit is contained in:
Akshett Rai Jindal 2024-08-20 01:12:04 +05:30
parent ae83ff15a2
commit 8314780959
2 changed files with 9 additions and 3 deletions

View file

@ -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]

View file

@ -567,6 +567,7 @@ mod test {
author_signature: None,
is_automatic_forward: false,
has_protected_content: false,
is_from_offline: false,
}),
}),
};