summary refs log tree commit diff
diff options
context:
space:
mode:
authorH. Shay <hillerys@element.io>2022-11-08 12:19:42 -0800
committerH. Shay <hillerys@element.io>2022-11-08 12:19:42 -0800
commitfd98493c8603611a4a1292f7717574603e91e23c (patch)
tree62302079b1178cfbacf60bd88fbc1bcf772a6355
parentMerge branch 'shay/batch_state_groups' of https://github.com/matrix-org/synap... (diff)
downloadsynapse-fd98493c8603611a4a1292f7717574603e91e23c.tar.xz
remove duplicated code and update comment github/shay/batch_state_groups shay/batch_state_groups
-rw-r--r--synapse/handlers/room.py6
-rw-r--r--synapse/storage/databases/state/store.py1
2 files changed, 1 insertions, 6 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index 7e6d6490aa..c35b40db0e 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -1147,12 +1147,6 @@ class RoomCreationHandler:
         # through a different code path
         depth += 1
         state_map[(EventTypes.Member, creator.user.to_string())] = member_event_id
-        event_to_state_group = (
-            await self._storage_controllers.state.get_state_group_for_events(
-                [member_event_id]
-            )
-        )
-        current_state_group = event_to_state_group[member_event_id]
 
         # we need the state group of the membership event as it is the current state group
         event_to_state = (
diff --git a/synapse/storage/databases/state/store.py b/synapse/storage/databases/state/store.py
index b554d80d7b..1c842a6657 100644
--- a/synapse/storage/databases/state/store.py
+++ b/synapse/storage/databases/state/store.py
@@ -421,6 +421,7 @@ class StateGroupDataStore(StateBackgroundUpdateStore, SQLBaseStore):
             room_id: the id of the room the events were created for
             prev_group: the state group of the last event persisted before the batched events
             were created
+        Returns: list of state groups that correspond to the events in `events_and_context`
         """
 
         def insert_deltas_group_txn(