mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-16 19:41:07 +03:00
Fix ._chat_peer could be None in Event.filter()
This commit is contained in:
parent
7225b7a40f
commit
c95467ea3e
|
@ -108,7 +108,8 @@ class EventBuilder(abc.ABC):
|
|||
return None
|
||||
|
||||
if self.chats is not None:
|
||||
inside = utils.get_peer_id(event._chat_peer) in self.chats
|
||||
# Note: the `event.chat_id` property checks if it's `None` for us
|
||||
inside = event.chat_id in self.chats
|
||||
if inside == self.blacklist_chats:
|
||||
# If this chat matches but it's a blacklist ignore.
|
||||
# If it doesn't match but it's a whitelist ignore.
|
||||
|
|
Loading…
Reference in New Issue
Block a user