fix: Allow Exif for stickers, don't recode them because of that (#6447)

Core doesn't auto-assign `Viewtype::Sticker` to messages and stickers coming from UIs shouldn't
contain sensitive Exif info.
This commit is contained in:
iequidoo
2025-09-29 13:47:34 -03:00
committed by iequidoo
parent 31391fc074
commit ba2e573c23
3 changed files with 30 additions and 5 deletions

View File

@@ -367,11 +367,12 @@ impl<'a> BlobObject<'a> {
|| img.get_pixel(x_max, y_max).0[3] == 0)
{
*vt = Viewtype::Image;
} else {
// Core doesn't auto-assign `Viewtype::Sticker` to messages and stickers coming
// from UIs shouldn't contain sensitive Exif info.
return Ok(name);
}
}
if *vt == Viewtype::Sticker && exif.is_none() {
return Ok(name);
}
img = match orientation {
Some(90) => img.rotate90(),