Don't access NewMessage properties when building the event

This commit is contained in:
Lonami Exo 2018-02-07 13:55:25 +01:00
parent 9c09233b4f
commit dc43757cff

View File

@ -92,7 +92,7 @@ class NewMessage(_EventBuilder):
return return
if self.chats is not None: if self.chats is not None:
inside = utils.get_peer_id(event.input_chat) in self.chats inside = utils.get_peer_id(event.message.to_id) in self.chats
if inside == self.blacklist_chats: if inside == self.blacklist_chats:
# If this chat matches but it's a blacklist ignore. # If this chat matches but it's a blacklist ignore.
# If it doesn't match but it's a whitelist ignore. # If it doesn't match but it's a whitelist ignore.