mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 09:26:37 +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
|
if search and (filter
|
||||||
or not isinstance(entity, types.InputPeerChannel)):
|
or not isinstance(entity, types.InputPeerChannel)):
|
||||||
# We need to 'search' ourselves unless we have a PeerChannel
|
# We need to 'search' ourselves unless we have a PeerChannel
|
||||||
search = search.lower()
|
search = search.casefold()
|
||||||
|
|
||||||
self.filter_entity = lambda ent: (
|
self.filter_entity = lambda ent: (
|
||||||
search in utils.get_display_name(ent).lower() or
|
search in utils.get_display_name(ent).casefold() or
|
||||||
search in (getattr(ent, 'username', '') or None).lower()
|
search in (getattr(ent, 'username', None) or '').casefold()
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
self.filter_entity = lambda ent: True
|
self.filter_entity = lambda ent: True
|
||||||
|
|
Loading…
Reference in New Issue
Block a user