@@ -4,6 +4,8 @@ use js_int::UInt;
4
4
use ruma_common:: OwnedMxcUri ;
5
5
use serde:: { Deserialize , Serialize } ;
6
6
7
+ use super :: FormattedBody ;
8
+
7
9
use crate :: room:: { EncryptedFile , MediaSource , ThumbnailInfo } ;
8
10
9
11
/// The payload for a video message.
@@ -15,6 +17,14 @@ pub struct VideoMessageEventContent {
15
17
/// accessibility, e.g. "video attachment".
16
18
pub body : String ,
17
19
20
+ /// Formatted form of the message `body`.
21
+ #[ serde( flatten) ]
22
+ pub formatted : Option < FormattedBody > ,
23
+
24
+ /// The original filename of the uploaded file.
25
+ #[ serde( skip_serializing_if = "Option::is_none" ) ]
26
+ pub filename : Option < String > ,
27
+
18
28
/// The source of the video clip.
19
29
#[ serde( flatten) ]
20
30
pub source : MediaSource ,
@@ -27,7 +37,7 @@ pub struct VideoMessageEventContent {
27
37
impl VideoMessageEventContent {
28
38
/// Creates a new `VideoMessageEventContent` with the given body and source.
29
39
pub fn new ( body : String , source : MediaSource ) -> Self {
30
- Self { body, source, info : None }
40
+ Self { body, formatted : None , filename : None , source, info : None }
31
41
}
32
42
33
43
/// Creates a new non-encrypted `VideoMessageEventContent` with the given body and url.
0 commit comments