mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-06-02 18:12:26 -04:00
Notify ASes for events sent by other users in a room which an AS user is a part of.
This commit is contained in:
parent
9978c5c103
commit
c7783d6fee
4 changed files with 56 additions and 11 deletions
|
@ -143,3 +143,28 @@ class ApplicationServiceTestCase(unittest.TestCase):
|
|||
restrict_to=ApplicationService.NS_USERS,
|
||||
aliases_for_event=["#xmpp_barfoo:matrix.org"]
|
||||
))
|
||||
|
||||
def test_member_list_match(self):
|
||||
self.service.namespaces[ApplicationService.NS_USERS].append(
|
||||
"@irc_.*"
|
||||
)
|
||||
join_list = [
|
||||
Mock(
|
||||
type="m.room.member", room_id="!foo:bar", sender="@alice:here",
|
||||
state_key="@alice:here"
|
||||
),
|
||||
Mock(
|
||||
type="m.room.member", room_id="!foo:bar", sender="@irc_fo:here",
|
||||
state_key="@irc_fo:here" # AS user
|
||||
),
|
||||
Mock(
|
||||
type="m.room.member", room_id="!foo:bar", sender="@bob:here",
|
||||
state_key="@bob:here"
|
||||
)
|
||||
]
|
||||
|
||||
self.event.sender = "@xmpp_foobar:matrix.org"
|
||||
self.assertTrue(self.service.is_interested(
|
||||
event=self.event,
|
||||
member_list=join_list
|
||||
))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue