Skip to content

Commit 234c5f1

Browse files
committed
Update mautrix-python
1 parent 9487bf0 commit 234c5f1

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

mautrix_twitter/portal.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,7 @@ async def _handle_matrix_message(
353353
mime_type = message.info.mimetype or magic.from_buffer(data, mime=True)
354354
upload_resp = await sender.client.upload(data, mime_type=mime_type)
355355
media_id = upload_resp.media_id
356-
filename = message.get("filename", None)
357-
if filename and filename != message.body:
356+
if message.filename and message.filename != message.body:
358357
text = message.body
359358
else:
360359
text = ""
@@ -511,11 +510,11 @@ async def _convert_twitter_message(
511510
if reply_to_msg:
512511
text_content.set_reply(reply_to_msg.mxid)
513512
if media_content and self.config["bridge.caption_in_message"]:
514-
media_content["filename"] = media_content.body
513+
media_content.filename = media_content.body
515514
media_content.body = text_content.body
516515
if text_content.formatted_body:
517-
media_content["format"] = str(text_content.format)
518-
media_content["formatted_body"] = text_content.formatted_body
516+
media_content.format = text_content.format
517+
media_content.formatted_body = text_content.formatted_body
519518
else:
520519
converted.append(text_content)
521520
return converted

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ commonmark>=0.8,<0.10
44
aiohttp>=3,<4
55
yarl>=1,<2
66
attrs>=20.1
7-
mautrix>=0.20.2,<0.21
7+
mautrix>=0.20.5,<0.21
88
asyncpg>=0.20,<0.29

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
install_requires=install_requires,
5050
extras_require=extras_require,
51-
python_requires="~=3.8",
51+
python_requires="~=3.9",
5252

5353
classifiers=[
5454
"Development Status :: 4 - Beta",
@@ -57,7 +57,6 @@
5757
"Framework :: AsyncIO",
5858
"Programming Language :: Python",
5959
"Programming Language :: Python :: 3",
60-
"Programming Language :: Python :: 3.8",
6160
"Programming Language :: Python :: 3.9",
6261
"Programming Language :: Python :: 3.10",
6362
],

0 commit comments

Comments
 (0)