mirror of
https://github.com/chatmail/core.git
synced 2026-10-02 11:10:25 +03:00
feat: delete avatars referred to by parameters of special contacts
It is not clear if old versions stored SELF avatar in parameters or if it happened due to a bug, but if it happens, we can safely delete the avatar. get_profile_image_ext() is refactored to make it not try to load avatars for any special contacts.
This commit is contained in:
+4
-1
@@ -1639,7 +1639,10 @@ WHERE addr=?
|
||||
}
|
||||
} else if self.id == ContactId::DEVICE {
|
||||
Ok(Some(chat::get_device_icon(context).await?))
|
||||
} else if show_fallback_icon && !self.id.is_special() && !self.is_key_contact() {
|
||||
} else if self.id.is_special() {
|
||||
// All special contacts are handled above.
|
||||
Ok(None)
|
||||
} else if show_fallback_icon && !self.is_key_contact() {
|
||||
Ok(Some(chat::get_unencrypted_icon(context).await?))
|
||||
} else if let Some(image_rel) = self.param.get(Param::ProfileImage)
|
||||
&& !image_rel.is_empty()
|
||||
|
||||
Reference in New Issue
Block a user