diff options
author | Kegan Dougal <kegan@matrix.org> | 2015-03-31 16:43:49 +0100 |
---|---|---|
committer | Kegan Dougal <kegan@matrix.org> | 2015-03-31 16:44:45 +0100 |
commit | 09cbff174a01757d10107b7960972a484153323e (patch) | |
tree | 52229facc62f2f0ad95301c62fa3fddf06a53530 /tests | |
parent | Add note in changelog about change in config option names (diff) | |
download | synapse-09cbff174a01757d10107b7960972a484153323e.tar.xz |
Fix thinko whereby events *for the AS specifically* were not passed on.
This was caused by not explicitly checking the service.sender field. This has now been fixed and a regression test has been added.
Diffstat (limited to '')
-rw-r--r-- | tests/appservice/test_appservice.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/appservice/test_appservice.py b/tests/appservice/test_appservice.py index eb7becf725..62149d6902 100644 --- a/tests/appservice/test_appservice.py +++ b/tests/appservice/test_appservice.py @@ -199,6 +199,19 @@ class ApplicationServiceTestCase(unittest.TestCase): aliases_for_event=["#xmpp_barfoo:matrix.org"] )) + def test_interested_in_self(self): + # make sure invites get through + self.service.sender = "@appservice:name" + self.service.namespaces[ApplicationService.NS_USERS].append( + _regex("@irc_.*") + ) + self.event.type = "m.room.member" + self.event.content = { + "membership": "invite" + } + self.event.state_key = self.service.sender + self.assertTrue(self.service.is_interested(self.event)) + def test_member_list_match(self): self.service.namespaces[ApplicationService.NS_USERS].append( _regex("@irc_.*") |