mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-05 04:30:22 +03:00
Ignore ChannelParticipantLeft while iterating the members list
This commit is contained in:
parent
f9643bf737
commit
aee4685413
|
@ -233,6 +233,10 @@ class _ParticipantsIter(RequestIter):
|
|||
users = {user.id: user for user in participants.users}
|
||||
for participant in participants.participants:
|
||||
|
||||
if isinstance(participant, types.ChannelParticipantLeft):
|
||||
# These participants should be ignored. See #3231.
|
||||
continue
|
||||
|
||||
if isinstance(participant, types.ChannelParticipantBanned):
|
||||
if not isinstance(participant.peer, types.PeerUser):
|
||||
# May have the entire channel banned. See #3105.
|
||||
|
|
Loading…
Reference in New Issue
Block a user