mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2024-10-01 03:35:38 -04:00
client: Simplify the thumbnail URL setting.
This commit is contained in:
parent
9e53315540
commit
a2994b0a55
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user