mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 08:24:55 -04:00
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.
This commit is contained in:
parent
9a506a191a
commit
09cbff174a
2 changed files with 17 additions and 1 deletions
|
@ -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_.*")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue