mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-17 21:22:40 +00:00
Merge branch 'develop' into asyncio
This commit is contained in:
commit
ae96ca5b90
@ -22,6 +22,7 @@ from typing import Union, AsyncGenerator, Optional
|
||||
from async_generator import async_generator, yield_
|
||||
|
||||
import pyrogram
|
||||
from pyrogram.api import types
|
||||
from ...ext import BaseClient
|
||||
|
||||
|
||||
@ -85,6 +86,7 @@ class IterChatMembers(BaseClient):
|
||||
queries = [query] if query else QUERIES
|
||||
total = limit or (1 << 31) - 1
|
||||
limit = min(200, total)
|
||||
resolved_chat_id = self.resolve_peer(chat_id)
|
||||
|
||||
filter = (
|
||||
Filters.RECENT
|
||||
@ -110,6 +112,9 @@ class IterChatMembers(BaseClient):
|
||||
if not chat_members:
|
||||
break
|
||||
|
||||
if isinstance(resolved_chat_id, types.InputPeerChat):
|
||||
total = len(chat_members)
|
||||
|
||||
offset += len(chat_members)
|
||||
|
||||
for chat_member in chat_members:
|
||||
|
Loading…
Reference in New Issue
Block a user