mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-22 15:17:00 +01:00
Update filters to new_chat_members instead of new_chat_member
This commit is contained in:
parent
27a4fa8dba
commit
f4c6197c5f
2 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue