diff --git a/pyrogram/client/methods/messages/get_dialogs.py b/pyrogram/client/methods/messages/get_dialogs.py index d0ef032b..28687511 100644 --- a/pyrogram/client/methods/messages/get_dialogs.py +++ b/pyrogram/client/methods/messages/get_dialogs.py @@ -90,7 +90,10 @@ class GetDialogs(BaseClient): dialogs.append( pyrogram.Dialog( id=chat_id, - top_message=messages.get(chat_id) + top_message=messages.get(chat_id), + unread_messages_count=dialog.unread_count, + unread_mentions_count=dialog.unread_mentions_count, + unread_mark=dialog.unread_mark ) ) diff --git a/pyrogram/client/types/dialog.py b/pyrogram/client/types/dialog.py index 792360a6..4210f105 100644 --- a/pyrogram/client/types/dialog.py +++ b/pyrogram/client/types/dialog.py @@ -22,7 +22,15 @@ from pyrogram.api.core import Object class Dialog(Object): ID = 0xb0700028 - def __init__(self, id: int, top_message): + def __init__(self, + id: int, + top_message, + unread_messages_count: int, + unread_mentions_count: int, + unread_mark: bool): # TODO docstrings self.id = id self.top_message = top_message + self.unread_messages_count = unread_messages_count + self.unread_mentions_count = unread_mentions_count + self.unread_mark = unread_mark