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:
link2xt
2026-08-29 16:50:50 +00:00
committed by l
parent 322dd11d99
commit 4d5ebe9ff4
2 changed files with 12 additions and 2 deletions
+4 -1
View File
@@ -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()