Mark reactions as read when reading from Matrix

This commit is contained in:
Tulir Asokan
2022-04-01 15:56:16 +03:00
parent 39ab1d0c22
commit 61f3c39cc2
4 changed files with 4 additions and 2 deletions

View File

@@ -16,6 +16,7 @@
* Disabled file logging in Docker image by default.
* If you want to enable it, set the `filename` in the file log handler to a
path that is writable, then add `"file"` back to `logging.root.handlers`.
* Reactions are now marked as read when bridging read receipts from Matrix.
### Fixed
* Fixed `!tg bridge` throwing error if the parameter is not an integer

View File

@@ -1425,7 +1425,7 @@ class Portal(DBPortal, BasePortal):
f"{message.mxid}/{message.tgid} as read by {user.mxid}/{user.tgid}"
)
await user.client.send_read_acknowledge(
self.peer, max_id=message.tgid, clear_mentions=True
self.peer, max_id=message.tgid, clear_mentions=True, clear_reactions=True
)
if self.peer_type == "channel" and not self.megagroup:
asyncio.create_task(self._try_handle_read_for_sponsored_msg(user, event_id, timestamp))

View File

@@ -4,6 +4,7 @@ force_to_top = "typing"
from_first = true
combine_as_imports = true
known_first_party = "mautrix"
known_third_party = "telethon"
line_length = 99
[tool.black]

View File

@@ -6,7 +6,7 @@ yarl>=1,<2
mautrix>=0.15.4,<0.16
#telethon>=1.24,<1.25
# Fork to make session storage async and update to layer 138
tulir-telethon==1.25.0a6
tulir-telethon==1.25.0a7
asyncpg>=0.20,<0.26
mako>=1,<2
setuptools