From 58774599078592b96979a75193b56e805314650d Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Sat, 15 Jun 2019 19:41:31 +0200 Subject: [PATCH] Create Message.mark_read() --- telethon/tl/custom/message.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/telethon/tl/custom/message.py b/telethon/tl/custom/message.py index 373feec5..643c76f9 100644 --- a/telethon/tl/custom/message.py +++ b/telethon/tl/custom/message.py @@ -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() + ` + 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