🐛 GetChatMembers: Fix unreached code problem
This commit is contained in:
parent
04b783281e
commit
cafc997df1
@ -101,19 +101,8 @@ class GetChatMembers(Scaffold):
|
||||
"""
|
||||
peer = await self.resolve_peer(chat_id)
|
||||
|
||||
if isinstance(peer, raw.types.InputPeerChat):
|
||||
r = await self.send(
|
||||
raw.functions.messages.GetFullChat(
|
||||
chat_id=peer.chat_id
|
||||
)
|
||||
)
|
||||
|
||||
members = getattr(r.full_chat.participants, "participants", [])
|
||||
users = {i.id: i for i in r.users}
|
||||
|
||||
return types.List(types.ChatMember._parse(self, member, users, {}) for member in members)
|
||||
elif isinstance(peer, raw.types.InputPeerChannel):
|
||||
filter = filter.lower()
|
||||
if isinstance(peer, (raw.types.InputPeerChannel, raw.types.InputPeerChat)):
|
||||
filter = filter.lower(),
|
||||
|
||||
if filter == Filters.ALL:
|
||||
filter = raw.types.ChannelParticipantsSearch(q=query)
|
||||
|
Loading…
Reference in New Issue
Block a user