mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2025-07-20 13:38:46 -04:00
pantalaimon: Modify the media events so they contain the decrypted URLs as well.
This closes 43.
This commit is contained in:
parent
6c4fb03744
commit
4b6b61c4be
1 changed files with 11 additions and 0 deletions
|
@ -827,6 +827,17 @@ 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"]
|
||||||
|
):
|
||||||
|
decrypted_event.source["content"]["info"][
|
||||||
|
"thumbnail_url"
|
||||||
|
] = decrypted_event.source["thumbnail_file"].get("url")
|
||||||
|
|
||||||
event_dict.update(decrypted_event.source)
|
event_dict.update(decrypted_event.source)
|
||||||
event_dict["decrypted"] = True
|
event_dict["decrypted"] = True
|
||||||
event_dict["verified"] = decrypted_event.verified
|
event_dict["verified"] = decrypted_event.verified
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue