mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-07 15:33:45 -04:00
fix(media): include the formatted caption and filename for audio and file attachments too
This commit is contained in:
@@ -2076,7 +2076,10 @@ impl Room {
|
||||
}
|
||||
|
||||
mime::AUDIO => {
|
||||
let mut content = AudioMessageEventContent::new(body, source);
|
||||
let mut content = assign!(AudioMessageEventContent::new(body, source), {
|
||||
formatted: formatted_caption,
|
||||
filename
|
||||
});
|
||||
|
||||
if let Some(AttachmentInfo::Voice { audio_info, waveform: Some(waveform_vec) }) =
|
||||
&info
|
||||
@@ -2117,7 +2120,9 @@ impl Room {
|
||||
thumbnail_info
|
||||
});
|
||||
let content = assign!(FileMessageEventContent::new(body, source), {
|
||||
info: Some(Box::new(info))
|
||||
info: Some(Box::new(info)),
|
||||
formatted: formatted_caption,
|
||||
filename,
|
||||
});
|
||||
MessageType::File(content)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user