From f4c6197c5fb955538c6e12050c3299a3ecda1de9 Mon Sep 17 00:00:00 2001 From: Jacob Bom Date: Thu, 25 May 2017 14:45:47 +0200 Subject: [PATCH] Update filters to new_chat_members instead of new_chat_member --- telegram/ext/filters.py | 2 +- tests/test_filters.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/telegram/ext/filters.py b/telegram/ext/filters.py index eb965e108..67e5d435d 100644 --- a/telegram/ext/filters.py +++ b/telegram/ext/filters.py @@ -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 diff --git a/tests/test_filters.py b/tests/test_filters.py index ecb173791..bb41e514b 100644 --- a/tests/test_filters.py +++ b/tests/test_filters.py @@ -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))