Skip to content

Commit 692073c

Browse files
committed
Fix get_dialogs_count breaking in case of less than 200 dialogs
1 parent 0855463 commit 692073c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pyrogram/client/methods/chats/get_dialogs_count.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,7 @@ def get_dialogs_count(self, pinned_only: bool = False) -> int:
4848
)
4949
)
5050

51-
return r.count
51+
if isinstance(r, types.messages.Dialogs):
52+
return len(r.dialogs)
53+
else:
54+
return r.count

0 commit comments

Comments
 (0)