diff options
author | David Robertson <davidr@element.io> | 2023-01-13 17:58:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-13 17:58:53 +0000 |
commit | 52ae80dd1afd9bb5b4cf2bb79297e1590f92cacb (patch) | |
tree | f7f061c591762bbb75c82900db6a375925500f7b /synapse/federation/transport/server | |
parent | Merge account data streams (#14826) (diff) | |
download | synapse-52ae80dd1afd9bb5b4cf2bb79297e1590f92cacb.tar.xz |
Use stable identifiers for faster joins (#14832)
* Use new query param when requesting a partial join * Read new query param when serving partial join * Provide new field names when serving partial joins * Read new field names from partial join response * Changelog
Diffstat (limited to 'synapse/federation/transport/server')
-rw-r--r-- | synapse/federation/transport/server/federation.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/synapse/federation/transport/server/federation.py b/synapse/federation/transport/server/federation.py index 53e77b4bb6..c0a700905b 100644 --- a/synapse/federation/transport/server/federation.py +++ b/synapse/federation/transport/server/federation.py @@ -437,9 +437,16 @@ class FederationV2SendJoinServlet(BaseFederationServerServlet): partial_state = False if self._msc3706_enabled: - partial_state = parse_boolean_from_args( - query, "org.matrix.msc3706.partial_state", default=False - ) + # The stable query parameter wins, if it disagrees with the unstable + # parameter for some reason. + stable_param = parse_boolean_from_args(query, "omit_members", default=None) + if stable_param is not None: + partial_state = stable_param + else: + partial_state = parse_boolean_from_args( + query, "org.matrix.msc3706.partial_state", default=False + ) + result = await self.handler.on_send_join_request( origin, content, room_id, caller_supports_partial_state=partial_state ) |