diff --git a/src/chat.rs b/src/chat.rs index 26f57b6bf..7d025cb6f 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -1408,7 +1408,9 @@ async fn prepare_msg_blob(context: &Context, msg: &mut Message) -> Result<(), Er message::guess_msgtype_from_suffix(&blob.to_abs_path()) { msg.viewtype = better_type; - msg.param.set(Param::MimeType, better_mime); + if !msg.param.exists(Param::MimeType) { + msg.param.set(Param::MimeType, better_mime); + } } } else if !msg.param.exists(Param::MimeType) { if let Some((_, mime)) = message::guess_msgtype_from_suffix(&blob.to_abs_path()) {