mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 14:44:55 -04:00
Implement MSC3706: partial state in /send_join
response (#11967)
* Make `get_auth_chain_ids` return a Set It has a set internally, and a set is often useful where it gets used, so let's avoid converting to an intermediate list. * Minor refactors in `on_send_join_request` A little bit of non-functional groundwork * Implement MSC3706: partial state in /send_join response
This commit is contained in:
parent
b2b971f28a
commit
63c46349c4
7 changed files with 262 additions and 21 deletions
|
@ -260,16 +260,16 @@ class EventFederationWorkerStoreTestCase(tests.unittest.HomeserverTestCase):
|
|||
self.assertCountEqual(auth_chain_ids, ["h", "i", "j", "k"])
|
||||
|
||||
auth_chain_ids = self.get_success(self.store.get_auth_chain_ids(room_id, ["h"]))
|
||||
self.assertEqual(auth_chain_ids, ["k"])
|
||||
self.assertEqual(auth_chain_ids, {"k"})
|
||||
|
||||
auth_chain_ids = self.get_success(self.store.get_auth_chain_ids(room_id, ["i"]))
|
||||
self.assertEqual(auth_chain_ids, ["j"])
|
||||
self.assertEqual(auth_chain_ids, {"j"})
|
||||
|
||||
# j and k have no parents.
|
||||
auth_chain_ids = self.get_success(self.store.get_auth_chain_ids(room_id, ["j"]))
|
||||
self.assertEqual(auth_chain_ids, [])
|
||||
self.assertEqual(auth_chain_ids, set())
|
||||
auth_chain_ids = self.get_success(self.store.get_auth_chain_ids(room_id, ["k"]))
|
||||
self.assertEqual(auth_chain_ids, [])
|
||||
self.assertEqual(auth_chain_ids, set())
|
||||
|
||||
# More complex input sequences.
|
||||
auth_chain_ids = self.get_success(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue