mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 17:36:29 +03:00
@@ -1333,8 +1333,10 @@ async fn prepare_msg_blob(context: &Context, msg: &mut Message) -> Result<(), Er
|
|||||||
format_err!("Attachment missing for message of type #{}", msg.viewtype)
|
format_err!("Attachment missing for message of type #{}", msg.viewtype)
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
if msg.viewtype == Viewtype::Image && blob.recode_to_image_size(context).await.is_err() {
|
if msg.viewtype == Viewtype::Image {
|
||||||
warn!(context, "Cannot recode image, using original data");
|
if let Err(e) = blob.recode_to_image_size(context).await {
|
||||||
|
warn!(context, "Cannot recode image, using original data: {:?}", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
msg.param.set(Param::File, blob.as_name());
|
msg.param.set(Param::File, blob.as_name());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user