summary refs log tree commit diff
path: root/synapse/storage/event_federation.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-12-16 19:11:13 +0000
committerErik Johnston <erik@matrix.org>2014-12-16 19:11:13 +0000
commit2215faa361dae861d946956f04dad629353db1ce (patch)
treeafcc54e8847c6a1ea66be9bf94bfca9197e2ff18 /synapse/storage/event_federation.py
parentMake error messages slightly more helpful (diff)
parentAdd FIXME (diff)
downloadsynapse-2215faa361dae861d946956f04dad629353db1ce.tar.xz
Merge branch 'hotfixes-v0.5.4a' of github.com:matrix-org/synapse into release-v0.6.0
Diffstat (limited to 'synapse/storage/event_federation.py')
-rw-r--r--synapse/storage/event_federation.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/synapse/storage/event_federation.py b/synapse/storage/event_federation.py
index ced066f407..7a6009c9ee 100644
--- a/synapse/storage/event_federation.py
+++ b/synapse/storage/event_federation.py
@@ -32,15 +32,15 @@ class EventFederationStore(SQLBaseStore):
     and backfilling from another server respectively.
     """
 
-    def get_auth_chain(self, event_id):
+    def get_auth_chain(self, event_ids):
         return self.runInteraction(
             "get_auth_chain",
             self._get_auth_chain_txn,
-            event_id
+            event_ids
         )
 
-    def _get_auth_chain_txn(self, txn, event_id):
-        results = self._get_auth_chain_ids_txn(txn, event_id)
+    def _get_auth_chain_txn(self, txn, event_ids):
+        results = self._get_auth_chain_ids_txn(txn, event_ids)
 
         sql = "SELECT * FROM events WHERE event_id = ?"
         rows = []
@@ -50,21 +50,21 @@ class EventFederationStore(SQLBaseStore):
 
         return self._parse_events_txn(txn, rows)
 
-    def get_auth_chain_ids(self, event_id):
+    def get_auth_chain_ids(self, event_ids):
         return self.runInteraction(
             "get_auth_chain_ids",
             self._get_auth_chain_ids_txn,
-            event_id
+            event_ids
         )
 
-    def _get_auth_chain_ids_txn(self, txn, event_id):
+    def _get_auth_chain_ids_txn(self, txn, event_ids):
         results = set()
 
         base_sql = (
             "SELECT auth_id FROM event_auth WHERE %s"
         )
 
-        front = set([event_id])
+        front = set(event_ids)
         while front:
             sql = base_sql % (
                 " OR ".join(["event_id=?"] * len(front)),