summary refs log tree commit diff
path: root/synapse/federation/transport
diff options
context:
space:
mode:
authorSean Quah <8349537+squahtx@users.noreply.github.com>2023-01-16 23:15:17 +0000
committerGitHub <noreply@github.com>2023-01-16 23:15:17 +0000
commitdb5145a31d8ed76ac637f933f4facc195d557f75 (patch)
treed27f7efa488fa98259154e689b1ddbaf1e508a90 /synapse/federation/transport
parentAdd an early return when handling no-op presence updates. (#14855) (diff)
downloadsynapse-db5145a31d8ed76ac637f933f4facc195d557f75.tar.xz
Add parameter to control whether we do a partial state join (#14843)
When the local homeserver is already joined to a room and wants to
perform another remote join, we may find it useful to do a non-partial
state join if we already have the full state for the room.

Signed-off-by: Sean Quah <seanq@matrix.org>
Diffstat (limited to 'synapse/federation/transport')
-rw-r--r--synapse/federation/transport/client.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/federation/transport/client.py b/synapse/federation/transport/client.py

index 5ec651400a..556883f079 100644 --- a/synapse/federation/transport/client.py +++ b/synapse/federation/transport/client.py
@@ -351,13 +351,16 @@ class TransportLayerClient: room_id: str, event_id: str, content: JsonDict, + omit_members: bool, ) -> "SendJoinResponse": path = _create_v2_path("/send_join/%s/%s", room_id, event_id) query_params: Dict[str, str] = {} if self._faster_joins_enabled: # lazy-load state on join - query_params["org.matrix.msc3706.partial_state"] = "true" - query_params["omit_members"] = "true" + query_params["org.matrix.msc3706.partial_state"] = ( + "true" if omit_members else "false" + ) + query_params["omit_members"] = "true" if omit_members else "false" return await self.client.put_json( destination=destination,