File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed
Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -2336,20 +2336,17 @@ async def _handle_matrix_message(
23362336 sender .command_status = None
23372337 except (KeyError , TypeError ):
23382338 if not logged_in or (
2339- " filename" in content and content [ " filename" ] != content .body
2339+ content . filename is not None and content . filename != content .body
23402340 ):
2341- if "filename" in content :
2342- file_name = content [ " filename" ]
2341+ if content . filename :
2342+ file_name = content . filename
23432343 caption_content = TextMessageEventContent (
23442344 msgtype = MessageType .TEXT ,
23452345 body = content .body ,
23462346 )
2347- if (
2348- "formatted_body" in content
2349- and str (content .get ("format" )) == Format .HTML .value
2350- ):
2351- caption_content ["formatted_body" ] = content ["formatted_body" ]
2352- caption_content ["format" ] = Format .HTML
2347+ if content .formatted_body and content .format == Format .HTML :
2348+ caption_content .formatted_body = content .formatted_body
2349+ caption_content .format = Format .HTML
23532350 else :
23542351 caption_content = None
23552352 if caption_content :
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ python-magic>=0.4,<0.5
33commonmark >= 0.8 ,< 0.10
44aiohttp >= 3 ,< 4
55yarl >= 1 ,< 2
6- mautrix >= 0.20.4 ,< 0.21
6+ mautrix >= 0.20.5 ,< 0.21
77tulir-telethon == 1.35.0a1
88asyncpg >= 0.20 ,< 0.30
99mako >= 1 ,< 2
You can’t perform that action at this time.
0 commit comments