Update to layer 138 (#3698)

This commit is contained in:
Devesh Pal
2022-02-04 18:52:51 +05:30
committed by GitHub
parent a3a60e6dca
commit acc512683c
3 changed files with 24 additions and 9 deletions

View File

@@ -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))