include mxcs from dangling thumbnails in service::media::iter_all

When requesting remote thumbnails over federation, we can end up with a
thumbnail in the media db without an associated original file. Because
of this, skipping thumbnails is insufficient to get a list of all MXCs.
This commit is contained in:
Olivia Lee 2024-11-29 11:33:13 -08:00
parent 230192be1b
commit 916088a22f
No known key found for this signature in database
GPG key ID: 54D568A15B9CD1F9
3 changed files with 19 additions and 10 deletions

View file

@ -208,11 +208,6 @@ impl service::media::Data for KeyValueDatabase {
let key = MediaFileKey::new(key);
let parts = MediaFileKeyParts::try_from(&key)?;
if parts.width != 0 || parts.height != 0 {
// Skip thumbnails
return Ok(None);
};
Ok(Some((parts.mxc, parts.meta, key)))
})
.filter_map(Result::transpose),