Update filters to new_chat_members instead of new_chat_member

This commit is contained in:
Jacob Bom 2017-05-25 14:45:47 +02:00
parent 27a4fa8dba
commit f4c6197c5f
2 changed files with 3 additions and 3 deletions

View file

@ -215,7 +215,7 @@ class Filters(object):
class _StatusUpdate(BaseFilter):
def filter(self, message):
return bool(message.new_chat_member or message.left_chat_member
return bool(message.new_chat_members or message.left_chat_member
or message.new_chat_title or message.new_chat_photo
or message.delete_chat_photo or message.group_chat_created
or message.supergroup_chat_created or message.channel_chat_created

View file

@ -121,9 +121,9 @@ class FiltersTest(BaseTest, unittest.TestCase):
def test_filters_status_update(self):
self.assertFalse(Filters.status_update(self.message))
self.message.new_chat_member = 'test'
self.message.new_chat_members = ['test']
self.assertTrue(Filters.status_update(self.message))
self.message.new_chat_member = None
self.message.new_chat_members = None
self.message.left_chat_member = 'test'
self.assertTrue(Filters.status_update(self.message))