summary refs log tree commit diff
path: root/synapse/storage/state.py
diff options
context:
space:
mode:
authorShay <hillerys@element.io>2022-05-20 01:54:12 -0700
committerGitHub <noreply@github.com>2022-05-20 09:54:12 +0100
commit71e8afe34d2103c5ccc9f2d1c99587d14b2acc56 (patch)
tree38ca83b911323cd5312165467e2b8bf077987d2a /synapse/storage/state.py
parentFix `RetryDestinationLimiter` re-starting finished log contexts (#12803) (diff)
downloadsynapse-71e8afe34d2103c5ccc9f2d1c99587d14b2acc56.tar.xz
Update EventContext `get_current_event_ids` and `get_prev_event_ids` to accept state filters and update calls where possible (#12791)
Diffstat (limited to 'synapse/storage/state.py')
-rw-r--r--synapse/storage/state.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/storage/state.py b/synapse/storage/state.py

index e58301a8f0..ab630953ac 100644 --- a/synapse/storage/state.py +++ b/synapse/storage/state.py
@@ -634,16 +634,19 @@ class StateGroupStorage: return group_to_state - async def get_state_ids_for_group(self, state_group: int) -> StateMap[str]: + async def get_state_ids_for_group( + self, state_group: int, state_filter: Optional[StateFilter] = None + ) -> StateMap[str]: """Get the event IDs of all the state in the given state group Args: state_group: A state group for which we want to get the state IDs. + state_filter: specifies the type of state event to fetch from DB, example: EventTypes.JoinRules Returns: Resolves to a map of (type, state_key) -> event_id """ - group_to_state = await self.get_state_for_groups((state_group,)) + group_to_state = await self.get_state_for_groups((state_group,), state_filter) return group_to_state[state_group]