mirror of
https://github.com/chatmail/core.git
synced 2026-04-26 01:46:34 +03:00
feat: Send avatars as large as usual images when possible
- Remove limits on the avatar width and height, having a limit on its weight is sufficient. - Send avatars as large as usual images in protected chats, Outlook servers can't see avatars there anyway (they don't allow headers larger than 32k).
This commit is contained in:
@@ -4068,7 +4068,9 @@ pub async fn set_chat_profile_image(
|
||||
msg.text = stock_str::msg_grp_img_deleted(context, ContactId::SELF).await;
|
||||
} else {
|
||||
let mut image_blob = BlobObject::new_from_path(context, Path::new(new_image)).await?;
|
||||
image_blob.recode_to_avatar_size(context).await?;
|
||||
image_blob
|
||||
.recode_to_avatar_size(context, chat.is_protected())
|
||||
.await?;
|
||||
chat.param.set(Param::ProfileImage, image_blob.as_name());
|
||||
msg.param.set(Param::Arg, image_blob.as_name());
|
||||
msg.text = stock_str::msg_grp_img_changed(context, ContactId::SELF).await;
|
||||
|
||||
Reference in New Issue
Block a user