diff options
author | Erik Johnston <erik@matrix.org> | 2014-12-15 13:55:22 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-12-15 13:55:22 +0000 |
commit | c8dd3314d673fce90a53520475cdb19d5358dd34 (patch) | |
tree | bb84bfee9a2c83daa2ccb182de0169a3f4dc5e95 /synapse/storage/event_federation.py | |
parent | Remove unused imports (diff) | |
download | synapse-c8dd3314d673fce90a53520475cdb19d5358dd34.tar.xz |
Fix bug where we ignored event_edge_hashes table
Diffstat (limited to 'synapse/storage/event_federation.py')
-rw-r--r-- | synapse/storage/event_federation.py | 11 |
1 files changed, 6 insertions, 5 deletions
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"])) |