diff --git a/pyrogram/client/methods/chats/get_dialogs_count.py b/pyrogram/client/methods/chats/get_dialogs_count.py index 1ba6895f..bf1754ee 100644 --- a/pyrogram/client/methods/chats/get_dialogs_count.py +++ b/pyrogram/client/methods/chats/get_dialogs_count.py @@ -48,4 +48,7 @@ class GetDialogsCount(BaseClient): ) ) - return r.count + if isinstance(r, types.messages.Dialogs): + return len(r.dialogs) + else: + return r.count