summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2022-05-20 12:55:53 +0100
committerErik Johnston <erik@matrix.org>2022-05-20 12:58:50 +0100
commitc8c12ac13ae383298e8bc922f6279ce458492ba1 (patch)
tree0e4cc3fa5d0e7ee8d87e723e8d25b8a2b4c59544 /synapse
parentRequire 'latest_event_ids' (diff)
downloadsynapse-c8c12ac13ae383298e8bc922f6279ce458492ba1.tar.xz
Pull out less state when checking soft fail
Diffstat (limited to 'synapse')
-rw-r--r--synapse/handlers/federation_event.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/synapse/handlers/federation_event.py b/synapse/handlers/federation_event.py

index 383242a4c9..3c7ae2ea39 100644 --- a/synapse/handlers/federation_event.py +++ b/synapse/handlers/federation_event.py
@@ -1588,6 +1588,9 @@ class FederationEventHandler: room_version = await self._store.get_room_version_id(event.room_id) room_version_obj = KNOWN_ROOM_VERSIONS[room_version] + # The event types we want to pull from the "current" state. + auth_types = auth_types_for_event(room_version_obj, event) + # Calculate the "current state". if state is not None: # If we're explicitly given the state then we won't have all the @@ -1614,8 +1617,8 @@ class FederationEventHandler: k: e.event_id for k, e in current_states.items() } else: - current_state_ids = await self._state_handler.get_current_state_ids( - event.room_id, latest_event_ids=extrem_ids + current_state_ids = await self._store.get_filtered_current_state_ids( + event.room_id, StateFilter.from_types(auth_types) ) logger.debug( @@ -1625,7 +1628,6 @@ class FederationEventHandler: ) # Now check if event pass auth against said current state - auth_types = auth_types_for_event(room_version_obj, event) current_state_ids_list = [ e for k, e in current_state_ids.items() if k in auth_types ]