From b9adc5c294c5416c84c4cfbcba73b4dad9a6a3d3 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Mon, 18 Jan 2021 07:29:33 +0100 Subject: [PATCH] Add missing bound method Chat.mark_unread --- pyrogram/types/user_and_chats/chat.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pyrogram/types/user_and_chats/chat.py b/pyrogram/types/user_and_chats/chat.py index e3d3d1df..ca5a49e6 100644 --- a/pyrogram/types/user_and_chats/chat.py +++ b/pyrogram/types/user_and_chats/chat.py @@ -868,3 +868,23 @@ class Chat(Object): user_ids=user_ids, forward_limit=forward_limit ) + + async def mark_unread(self, ) -> bool: + """Bound method *mark_unread* of :obj:`~pyrogram.types.Chat`. + + Use as a shortcut for: + + .. code-block:: python + + client.mark_unread(chat_id) + + Example: + .. code-block:: python + + chat.mark_unread() + + Returns: + ``bool``: On success, True is returned. + """ + + return await self._client.mark_chat_unread(self.id)