summary refs log tree commit diff
path: root/synapse/storage/events.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-03-24 16:20:26 +0000
committerErik Johnston <erik@matrix.org>2015-03-24 16:20:26 +0000
commitf488293d96dc690ce7a4b3163fe8c4e0d3e31899 (patch)
tree35cb561fda5fdc7ad5d6a3d81ecf7c32a4804164 /synapse/storage/events.py
parentFix bugs in transactions storage (diff)
downloadsynapse-f488293d96dc690ce7a4b3163fe8c4e0d3e31899.tar.xz
Don't reinsert into event_edges
Diffstat (limited to 'synapse/storage/events.py')
-rw-r--r--synapse/storage/events.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py
index 542559c59f..4d636d3f46 100644
--- a/synapse/storage/events.py
+++ b/synapse/storage/events.py
@@ -149,14 +149,6 @@ class EventsStore(SQLBaseStore):
                 event.depth
             )
 
-        self._handle_prev_events(
-            txn,
-            outlier=outlier,
-            event_id=event.event_id,
-            prev_events=event.prev_events,
-            room_id=event.room_id,
-        )
-
         have_persisted = self._simple_select_one_onecol_txn(
             txn,
             table="event_json",
@@ -196,6 +188,14 @@ class EventsStore(SQLBaseStore):
                 )
             return
 
+        self._handle_prev_events(
+            txn,
+            outlier=outlier,
+            event_id=event.event_id,
+            prev_events=event.prev_events,
+            room_id=event.room_id,
+        )
+
         if event.type == EventTypes.Member:
             self._store_room_member_txn(txn, event)
         elif event.type == EventTypes.Name: