mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-01 21:56:03 -04:00
Fix up directory server to not require uploading room hosts. Update the room hosts table with the current room hosts (if we have them) on GET.
This commit is contained in:
parent
5f7cdbe0b8
commit
30bcbc433a
3 changed files with 16 additions and 2 deletions
|
@ -50,6 +50,7 @@ class DirectoryTestCase(unittest.TestCase):
|
|||
hs = HomeServer("test",
|
||||
datastore=Mock(spec=[
|
||||
"get_association_from_room_alias",
|
||||
"get_joined_hosts_for_room",
|
||||
]),
|
||||
http_client=None,
|
||||
resource_for_federation=Mock(),
|
||||
|
@ -61,6 +62,10 @@ class DirectoryTestCase(unittest.TestCase):
|
|||
|
||||
self.datastore = hs.get_datastore()
|
||||
|
||||
def hosts(room_id):
|
||||
return defer.succeed([])
|
||||
self.datastore.get_joined_hosts_for_room.side_effect = hosts
|
||||
|
||||
self.my_room = hs.parse_roomalias("#my-room:test")
|
||||
self.remote_room = hs.parse_roomalias("#another:remote")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue