events: Improve media event content formatted field docs

This commit is contained in:
Jonas Platte 2024-03-05 08:47:11 +01:00
parent 65d0880dc9
commit 0d72acd5e9
4 changed files with 12 additions and 4 deletions

View File

@ -18,7 +18,9 @@ pub struct AudioMessageEventContent {
/// uploaded file. Otherwise, this should be interpreted as a user-written media caption.
pub body: String,
/// Formatted form of the message `body`, if `body` is a caption.
/// Formatted form of the message `body`.
///
/// This should only be set if the body represents a caption.
#[serde(flatten)]
pub formatted: Option<FormattedBody>,

View File

@ -16,7 +16,9 @@ pub struct FileMessageEventContent {
/// uploaded file. Otherwise, this should be interpreted as a user-written media caption.
pub body: String,
/// Formatted form of the message `body`, if `body` is a caption.
/// Formatted form of the message `body`.
///
/// This should only be set if the body represents a caption.
#[serde(flatten)]
pub formatted: Option<FormattedBody>,

View File

@ -15,7 +15,9 @@ pub struct ImageMessageEventContent {
/// uploaded file. Otherwise, this should be interpreted as a user-written media caption.
pub body: String,
/// Formatted form of the message `body`, if `body` is a caption.
/// Formatted form of the message `body`.
///
/// This should only be set if the body represents a caption.
#[serde(flatten)]
pub formatted: Option<FormattedBody>,

View File

@ -18,7 +18,9 @@ pub struct VideoMessageEventContent {
/// uploaded file. Otherwise, this should be interpreted as a user-written media caption.
pub body: String,
/// Formatted form of the message `body`, if `body` is a caption.
/// Formatted form of the message `body`.
///
/// This should only be set if the body represents a caption.
#[serde(flatten)]
pub formatted: Option<FormattedBody>,