Mark reactions as read when reading from Matrix
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
* Disabled file logging in Docker image by default.
|
* Disabled file logging in Docker image by default.
|
||||||
* If you want to enable it, set the `filename` in the file log handler to a
|
* 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`.
|
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
|
||||||
* Fixed `!tg bridge` throwing error if the parameter is not an integer
|
* Fixed `!tg bridge` throwing error if the parameter is not an integer
|
||||||
|
|||||||
@@ -1425,7 +1425,7 @@ class Portal(DBPortal, BasePortal):
|
|||||||
f"{message.mxid}/{message.tgid} as read by {user.mxid}/{user.tgid}"
|
f"{message.mxid}/{message.tgid} as read by {user.mxid}/{user.tgid}"
|
||||||
)
|
)
|
||||||
await user.client.send_read_acknowledge(
|
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:
|
if self.peer_type == "channel" and not self.megagroup:
|
||||||
asyncio.create_task(self._try_handle_read_for_sponsored_msg(user, event_id, timestamp))
|
asyncio.create_task(self._try_handle_read_for_sponsored_msg(user, event_id, timestamp))
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ force_to_top = "typing"
|
|||||||
from_first = true
|
from_first = true
|
||||||
combine_as_imports = true
|
combine_as_imports = true
|
||||||
known_first_party = "mautrix"
|
known_first_party = "mautrix"
|
||||||
|
known_third_party = "telethon"
|
||||||
line_length = 99
|
line_length = 99
|
||||||
|
|
||||||
[tool.black]
|
[tool.black]
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ yarl>=1,<2
|
|||||||
mautrix>=0.15.4,<0.16
|
mautrix>=0.15.4,<0.16
|
||||||
#telethon>=1.24,<1.25
|
#telethon>=1.24,<1.25
|
||||||
# Fork to make session storage async and update to layer 138
|
# 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
|
asyncpg>=0.20,<0.26
|
||||||
mako>=1,<2
|
mako>=1,<2
|
||||||
setuptools
|
setuptools
|
||||||
|
|||||||
Reference in New Issue
Block a user