Create Message.mark_read()

This commit is contained in:
Lonami Exo 2019-06-15 19:41:31 +02:00
parent 1a056899d7
commit 5877459907

View File

@ -855,6 +855,16 @@ class Message(ChatGetter, SenderGetter, TLObject, abc.ABC):
else:
return await self._buttons[i][j].click()
async def mark_read(self):
"""
Marks the message as read. Shorthand for
`client.send_read_acknowledge()
<telethon.client.messages.MessageMethods.send_read_acknowledge>`
with both ``entity`` and ``message`` already set.
"""
await self._client.send_read_acknowledge(
await self.get_input_chat(), max_id=self.id)
async def pin(self, *, notify=False):
"""
Pins the message. Shorthand for