Properly include matrix:image:size OG tag

This commit is contained in:
Nexus 2024-02-09 23:06:47 +00:00
parent 0381bf9599
commit 5a239e57b3
Signed by: nex
GPG key ID: 0FA334385D0B689F

View file

@ -206,6 +206,8 @@ def preview_url(
)
if upload_response:
og_tags[tag_name] = upload_response
if tag_name == "image":
og_tags["matrix:image:size"] = len(response_media.content)
logging.info("Uploaded media: %r" % _url)
else:
logging.warning("Failed to upload media: %r (no returned mxc)", _url)