Implement crude encrypted EventImage downloading
When a message image is clicked in an encrypted room, the full file will be download (no GUI indication for now, just a print in terminal) and opened when ready. Before downloading, copying the image address via right click will put the full image mxc:// URL in clipboard. After downloading, it will be the local downloaded image path instead.
This commit is contained in:
@@ -209,6 +209,8 @@ class Thumbnail(Media):
|
||||
parsed = urlparse(self.mxc)
|
||||
|
||||
if self.crypt_dict:
|
||||
# Matrix makes encrypted thumbs only available through the download
|
||||
# end-point, not the thumbnail one
|
||||
resp = await self.cache.backend.download(
|
||||
server_name = parsed.netloc,
|
||||
media_id = parsed.path.lstrip("/"),
|
||||
|
||||
Reference in New Issue
Block a user