File tree 2 files changed +7
-10
lines changed
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(
2336
2336
sender .command_status = None
2337
2337
except (KeyError , TypeError ):
2338
2338
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
2340
2340
):
2341
- if "filename" in content :
2342
- file_name = content [ " filename" ]
2341
+ if content . filename :
2342
+ file_name = content . filename
2343
2343
caption_content = TextMessageEventContent (
2344
2344
msgtype = MessageType .TEXT ,
2345
2345
body = content .body ,
2346
2346
)
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
2353
2350
else :
2354
2351
caption_content = None
2355
2352
if caption_content :
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ python-magic>=0.4,<0.5
3
3
commonmark >= 0.8 ,< 0.10
4
4
aiohttp >= 3 ,< 4
5
5
yarl >= 1 ,< 2
6
- mautrix >= 0.20.4 ,< 0.21
6
+ mautrix >= 0.20.5 ,< 0.21
7
7
tulir-telethon == 1.35.0a1
8
8
asyncpg >= 0.20 ,< 0.30
9
9
mako >= 1 ,< 2
You can’t perform that action at this time.
0 commit comments