diff --git a/pantalaimon/client.py b/pantalaimon/client.py index f20b792..e705fda 100644 --- a/pantalaimon/client.py +++ b/pantalaimon/client.py @@ -830,13 +830,10 @@ class PanClient(AsyncClient): if isinstance(decrypted_event, RoomEncryptedMedia): decrypted_event.source["content"]["url"] = decrypted_event.url - if ( - "info" in decrypted_event.source - and "thumbnail_file" in decrypted_event.source["info"] - ): + if decrypted_event.thumbnail_url: decrypted_event.source["content"]["info"][ "thumbnail_url" - ] = decrypted_event.source["thumbnail_file"].get("url") + ] = decrypted_event.thumbnail_url event_dict.update(decrypted_event.source) event_dict["decrypted"] = True