summary refs log tree commit diff
path: root/synapse/handlers/room.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2019-01-31 18:21:39 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2019-01-31 18:21:39 +0000
commit3ed3cb43394b41e76f4739f22760c1d8ebfed3c7 (patch)
tree3086e935b3ce52f9b442bcfd68f2a0539a7ee640 /synapse/handlers/room.py
parentMerge branch 'develop' of github.com:matrix-org/synapse into anoa/room_upgrad... (diff)
downloadsynapse-3ed3cb43394b41e76f4739f22760c1d8ebfed3c7.tar.xz
New function for getting room's create event
Diffstat (limited to 'synapse/handlers/room.py')
-rw-r--r--synapse/handlers/room.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index a69441b96f..5e40e9ea46 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -266,13 +266,7 @@ class RoomCreationHandler(BaseHandler):
         # Check if old room was non-federatable
 
         # Get old room's create event
-        old_room_create_event_ids = yield self.store.get_filtered_current_state_ids(
-            old_room_id, StateFilter.from_types(((EventTypes.Create, ""),)),
-        )
-        old_room_create_event_dict = yield self.store.get_events(
-            old_room_create_event_ids.values(),
-        )
-        old_room_create_event = list(old_room_create_event_dict.values())[0]
+        old_room_create_event = yield self.store.get_create_event_for_room(old_room_id)
 
         # Check if the create event specified a non-federatable room
         if not old_room_create_event.content.get("m.federate", True):