summary refs log tree commit diff
path: root/synapse/storage/event_federation.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2018-11-05 13:35:15 +0000
committerAmber Brown <hawkowl@atleastfornow.net>2018-11-06 00:35:15 +1100
commitbc80b3f454aa9b9ca8bc710ff502b83892ac0a91 (patch)
treeda9af91ab5640b0124800a885a8f24767e2e54c7 /synapse/storage/event_federation.py
parentSet the encoding to UTF8 in the default logconfig (#4138) (diff)
downloadsynapse-bc80b3f454aa9b9ca8bc710ff502b83892ac0a91.tar.xz
Add helpers for getting prev and auth events (#4139)
* Add helpers for getting prev and auth events

This is in preparation for allowing the event format to change between
room versions.
Diffstat (limited to 'synapse/storage/event_federation.py')
-rw-r--r--synapse/storage/event_federation.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/event_federation.py b/synapse/storage/event_federation.py
index 3faca2a042..d3b9dea1d6 100644
--- a/synapse/storage/event_federation.py
+++ b/synapse/storage/event_federation.py
@@ -477,7 +477,7 @@ class EventFederationStore(EventFederationWorkerStore):
                     "is_state": False,
                 }
                 for ev in events
-                for e_id, _ in ev.prev_events
+                for e_id in ev.prev_event_ids()
             ],
         )
 
@@ -510,7 +510,7 @@ class EventFederationStore(EventFederationWorkerStore):
 
         txn.executemany(query, [
             (e_id, ev.room_id, e_id, ev.room_id, e_id, ev.room_id, False)
-            for ev in events for e_id, _ in ev.prev_events
+            for ev in events for e_id in ev.prev_event_ids()
             if not ev.internal_metadata.is_outlier()
         ])