mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-28 05:55:18 -04:00
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>
This commit is contained in:
parent
4db3331bb9
commit
db5145a31d
3 changed files with 24 additions and 5 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue