diff --git a/crates/ruma-events/src/room/message/audio.rs b/crates/ruma-events/src/room/message/audio.rs index 4ee49ede..c9c9a237 100644 --- a/crates/ruma-events/src/room/message/audio.rs +++ b/crates/ruma-events/src/room/message/audio.rs @@ -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, diff --git a/crates/ruma-events/src/room/message/file.rs b/crates/ruma-events/src/room/message/file.rs index aaca269e..8601bd1a 100644 --- a/crates/ruma-events/src/room/message/file.rs +++ b/crates/ruma-events/src/room/message/file.rs @@ -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, diff --git a/crates/ruma-events/src/room/message/image.rs b/crates/ruma-events/src/room/message/image.rs index 8c7336d2..55c33401 100644 --- a/crates/ruma-events/src/room/message/image.rs +++ b/crates/ruma-events/src/room/message/image.rs @@ -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, diff --git a/crates/ruma-events/src/room/message/video.rs b/crates/ruma-events/src/room/message/video.rs index 428e9f04..30fd9d55 100644 --- a/crates/ruma-events/src/room/message/video.rs +++ b/crates/ruma-events/src/room/message/video.rs @@ -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,