Evaluate filters before dispatching messages

This commit is contained in:
Dan 2018-04-09 23:35:51 +02:00
parent b6f28b2ec6
commit fb4e98b0b5

View File

@ -99,7 +99,14 @@ class Dispatcher:
handler = group.get(key, None)
if handler is not None:
args = (self, value, users, chats) if is_raw else (self.client, value)
if is_raw:
args = (self, value, users, chats)
else:
if not handler.check(value):
continue
args = (self.client, value)
handler.callback(*args)
def update_worker(self):