Skip to content

Commit

Permalink
Update mautrix-python
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Jul 9, 2024
1 parent f6cb26f commit 0137bfc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
15 changes: 6 additions & 9 deletions mautrix_telegram/portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -2336,20 +2336,17 @@ async def _handle_matrix_message(
sender.command_status = None
except (KeyError, TypeError):
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:
file_name = content["filename"]
if content.filename:
file_name = content.filename
caption_content = TextMessageEventContent(
msgtype=MessageType.TEXT,
body=content.body,
)
if (
"formatted_body" in content
and str(content.get("format")) == Format.HTML.value
):
caption_content["formatted_body"] = content["formatted_body"]
caption_content["format"] = Format.HTML
if content.formatted_body and content.format == Format.HTML:
caption_content.formatted_body = content.formatted_body
caption_content.format = Format.HTML
else:
caption_content = None
if caption_content:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ python-magic>=0.4,<0.5
commonmark>=0.8,<0.10
aiohttp>=3,<4
yarl>=1,<2
mautrix>=0.20.4,<0.21
mautrix>=0.20.5,<0.21
tulir-telethon==1.35.0a1
asyncpg>=0.20,<0.30
mako>=1,<2
Expand Down

0 comments on commit 0137bfc

Please sign in to comment.