mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-09 13:29:47 +00:00
Update to layer 138 (#3698)
This commit is contained in:
@@ -673,7 +673,8 @@ async def mark_read(
|
||||
entity: 'hints.EntityLike',
|
||||
message: 'hints.MessageIDLike' = None,
|
||||
*,
|
||||
clear_mentions: bool = False) -> bool:
|
||||
clear_mentions: bool = False,
|
||||
clear_reactions: bool = False) -> bool:
|
||||
if not message:
|
||||
max_id = 0
|
||||
elif isinstance(message, int):
|
||||
@@ -685,6 +686,9 @@ async def mark_read(
|
||||
if clear_mentions:
|
||||
await self(_tl.fn.messages.ReadMentions(entity))
|
||||
|
||||
if clear_reactions:
|
||||
await self(_tl.fn.messages.ReadReactions(entity))
|
||||
|
||||
if helpers._entity_type(entity) == helpers._EntityType.CHANNEL:
|
||||
return await self(_tl.fn.channels.ReadHistory(
|
||||
utils.get_input_channel(entity), max_id=max_id))
|
||||
|
@@ -55,6 +55,10 @@ class Dialog:
|
||||
How many mentions are currently unread in this dialog. Note that
|
||||
this value won't update when new messages arrive.
|
||||
|
||||
unread_reactions_count (`int`):
|
||||
How many reactions are currently unread in this dialog. Note that
|
||||
this value won't update when new messages arrive.
|
||||
|
||||
draft (`Draft <telethon.tl.custom.draft.Draft>`):
|
||||
The draft object in this dialog. It will not be `None`,
|
||||
so you can call ``draft.set_message(...)``.
|
||||
@@ -86,6 +90,7 @@ class Dialog:
|
||||
|
||||
self.unread_count = dialog.unread_count
|
||||
self.unread_mentions_count = dialog.unread_mentions_count
|
||||
self.unread_reactions_count = dialog.unread_reactions_count
|
||||
|
||||
self.draft = Draft(client, self.entity, self.dialog.draft)
|
||||
|
||||
|
Reference in New Issue
Block a user