Update mautrix-python

This commit is contained in:
Tulir Asokan
2024-07-09 12:09:39 +03:00
parent f6cb26f7f5
commit 0137bfcbf6
2 changed files with 7 additions and 10 deletions
+6 -9
View File
@@ -2336,20 +2336,17 @@ class Portal(DBPortal, BasePortal):
sender.command_status = None sender.command_status = None
except (KeyError, TypeError): except (KeyError, TypeError):
if not logged_in or ( if not logged_in or (
"filename" in content and content["filename"] != content.body content.filename is not None and content.filename != content.body
): ):
if "filename" in content: if content.filename:
file_name = content["filename"] file_name = content.filename
caption_content = TextMessageEventContent( caption_content = TextMessageEventContent(
msgtype=MessageType.TEXT, msgtype=MessageType.TEXT,
body=content.body, body=content.body,
) )
if ( if content.formatted_body and content.format == Format.HTML:
"formatted_body" in content caption_content.formatted_body = content.formatted_body
and str(content.get("format")) == Format.HTML.value caption_content.format = Format.HTML
):
caption_content["formatted_body"] = content["formatted_body"]
caption_content["format"] = Format.HTML
else: else:
caption_content = None caption_content = None
if caption_content: if caption_content:
+1 -1
View File
@@ -3,7 +3,7 @@ python-magic>=0.4,<0.5
commonmark>=0.8,<0.10 commonmark>=0.8,<0.10
aiohttp>=3,<4 aiohttp>=3,<4
yarl>=1,<2 yarl>=1,<2
mautrix>=0.20.4,<0.21 mautrix>=0.20.5,<0.21
tulir-telethon==1.35.0a1 tulir-telethon==1.35.0a1
asyncpg>=0.20,<0.30 asyncpg>=0.20,<0.30
mako>=1,<2 mako>=1,<2