mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-10 19:46:36 +03:00
Fix iter_participants search on small group chats
This commit is contained in:
parent
465f38c1c6
commit
a9ff328e38
|
@ -109,11 +109,11 @@ class _ParticipantsIter(RequestIter):
|
|||
if search and (filter
|
||||
or not isinstance(entity, types.InputPeerChannel)):
|
||||
# We need to 'search' ourselves unless we have a PeerChannel
|
||||
search = search.lower()
|
||||
search = search.casefold()
|
||||
|
||||
self.filter_entity = lambda ent: (
|
||||
search in utils.get_display_name(ent).lower() or
|
||||
search in (getattr(ent, 'username', '') or None).lower()
|
||||
search in utils.get_display_name(ent).casefold() or
|
||||
search in (getattr(ent, 'username', None) or '').casefold()
|
||||
)
|
||||
else:
|
||||
self.filter_entity = lambda ent: True
|
||||
|
|
Loading…
Reference in New Issue
Block a user