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):
|
if isinstance(decrypted_event, RoomEncryptedMedia):
|
||||||
decrypted_event.source["content"]["url"] = decrypted_event.url
|
decrypted_event.source["content"]["url"] = decrypted_event.url
|
||||||
|
|
||||||
if (
|
if decrypted_event.thumbnail_url:
|
||||||
"info" in decrypted_event.source
|
|
||||||
and "thumbnail_file" in decrypted_event.source["info"]
|
|
||||||
):
|
|
||||||
decrypted_event.source["content"]["info"][
|
decrypted_event.source["content"]["info"][
|
||||||
"thumbnail_url"
|
"thumbnail_url"
|
||||||
] = decrypted_event.source["thumbnail_file"].get("url")
|
] = decrypted_event.thumbnail_url
|
||||||
|
|
||||||
event_dict.update(decrypted_event.source)
|
event_dict.update(decrypted_event.source)
|
||||||
event_dict["decrypted"] = True
|
event_dict["decrypted"] = True
|
||||||
|
Loading…
Reference in New Issue
Block a user