mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2025-02-11 20:38:49 -05: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
@ -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["decrypted"] = True
|
||||
event_dict["verified"] = decrypted_event.verified
|
||||
|
Loading…
x
Reference in New Issue
Block a user