diff --git a/pyrogram/client/methods/messages/get_dialogs.py b/pyrogram/client/methods/messages/get_dialogs.py index f43ca6a5..e7b3e2a8 100644 --- a/pyrogram/client/methods/messages/get_dialogs.py +++ b/pyrogram/client/methods/messages/get_dialogs.py @@ -92,7 +92,8 @@ class GetDialogs(BaseClient): top_message=messages.get(chat_id), unread_messages_count=dialog.unread_count, unread_mentions_count=dialog.unread_mentions_count, - unread_mark=dialog.unread_mark + unread_mark=dialog.unread_mark, + is_pinned=dialog.pinned ) ) diff --git a/pyrogram/client/types/user_and_chats/dialog.py b/pyrogram/client/types/user_and_chats/dialog.py index 60ffb76c..fa5fb2b8 100644 --- a/pyrogram/client/types/user_and_chats/dialog.py +++ b/pyrogram/client/types/user_and_chats/dialog.py @@ -37,6 +37,9 @@ class Dialog(Object): unread_mark (``bool``): True, if the dialog has the unread mark set. + + is_pinned (``bool``): + True, if the dialog is pinned. """ ID = 0xb0700028 @@ -45,9 +48,11 @@ class Dialog(Object): top_message, unread_messages_count: int, unread_mentions_count: int, - unread_mark: bool): + unread_mark: bool, + is_pinned: bool): self.chat = chat self.top_message = top_message self.unread_messages_count = unread_messages_count self.unread_mentions_count = unread_mentions_count self.unread_mark = unread_mark + self.is_pinned = is_pinned