summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-12-15 13:55:22 +0000
committerErik Johnston <erik@matrix.org>2014-12-15 13:55:22 +0000
commitc8dd3314d673fce90a53520475cdb19d5358dd34 (patch)
treebb84bfee9a2c83daa2ccb182de0169a3f4dc5e95 /synapse
parentRemove unused imports (diff)
downloadsynapse-c8dd3314d673fce90a53520475cdb19d5358dd34.tar.xz
Fix bug where we ignored event_edge_hashes table
Diffstat (limited to 'synapse')
-rw-r--r--synapse/events/utils.py1
-rw-r--r--synapse/storage/__init__.py1
-rw-r--r--synapse/storage/_base.py1
-rw-r--r--synapse/storage/event_federation.py11
4 files changed, 7 insertions, 7 deletions
diff --git a/synapse/events/utils.py b/synapse/events/utils.py
index 4ab770dd5f..94f3f15f52 100644
--- a/synapse/events/utils.py
+++ b/synapse/events/utils.py
@@ -42,6 +42,7 @@ def prune_event(event):
         "auth_events",
         "origin",
         "origin_server_ts",
+        "membership",
     ]
 
     new_content = {}
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index 079ddac605..d0ea304b3d 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -91,7 +91,6 @@ class DataStore(RoomMemberStore, RoomStore,
 
     def __init__(self, hs):
         super(DataStore, self).__init__(hs)
-        self.event_factory = hs.get_event_factory()
         self.hs = hs
 
         self.min_token_deferred = self._get_min_token()
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py
index 1967290ad2..31d5163c19 100644
--- a/synapse/storage/_base.py
+++ b/synapse/storage/_base.py
@@ -83,7 +83,6 @@ class SQLBaseStore(object):
     def __init__(self, hs):
         self.hs = hs
         self._db_pool = hs.get_db_pool()
-        self.event_factory = hs.get_event_factory()
         self._clock = hs.get_clock()
 
     @defer.inlineCallbacks
diff --git a/synapse/storage/event_federation.py b/synapse/storage/event_federation.py
index 6c559f8f63..ced066f407 100644
--- a/synapse/storage/event_federation.py
+++ b/synapse/storage/event_federation.py
@@ -177,14 +177,15 @@ class EventFederationStore(SQLBaseStore):
             retcols=["prev_event_id", "is_state"],
         )
 
+        hashes = self._get_prev_event_hashes_txn(txn, event_id)
+
         results = []
         for d in res:
-            hashes = self._get_event_reference_hashes_txn(
-                txn,
-                d["prev_event_id"]
-            )
+            edge_hash = self._get_event_reference_hashes_txn(txn, d["prev_event_id"])
+            edge_hash.update(hashes.get(d["prev_event_id"], {}))
             prev_hashes = {
-                k: encode_base64(v) for k, v in hashes.items()
+                k: encode_base64(v)
+                for k, v in edge_hash.items()
                 if k == "sha256"
             }
             results.append((d["prev_event_id"], prev_hashes, d["is_state"]))