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