mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:36:02 -04:00
Make prev_event signing work again.
This commit is contained in:
parent
2f39dc19a2
commit
d30d79b5be
3 changed files with 18 additions and 8 deletions
|
@ -46,7 +46,7 @@ from .signatures import SignatureStore
|
|||
|
||||
from syutil.base64util import decode_base64
|
||||
|
||||
from synapse.crypto.event_signing import compute_pdu_event_reference_hash
|
||||
from synapse.crypto.event_signing import compute_event_reference_hash
|
||||
|
||||
|
||||
import json
|
||||
|
@ -271,11 +271,10 @@ class DataStore(RoomMemberStore, RoomStore,
|
|||
txn, event.event_id, prev_event_id, alg, hash_bytes
|
||||
)
|
||||
|
||||
# TODO
|
||||
# (ref_alg, ref_hash_bytes) = compute_pdu_event_reference_hash(pdu)
|
||||
# self._store_event_reference_hash_txn(
|
||||
# txn, event.event_id, ref_alg, ref_hash_bytes
|
||||
# )
|
||||
(ref_alg, ref_hash_bytes) = compute_event_reference_hash(event)
|
||||
self._store_event_reference_hash_txn(
|
||||
txn, event.event_id, ref_alg, ref_hash_bytes
|
||||
)
|
||||
|
||||
self._update_min_depth_for_room_txn(txn, event.room_id, event.depth)
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ class EventFederationStore(SQLBaseStore):
|
|||
|
||||
results = []
|
||||
for event_id, depth in txn.fetchall():
|
||||
hashes = self._get_prev_event_hashes_txn(txn, event_id)
|
||||
hashes = self._get_event_reference_hashes_txn(txn, event_id)
|
||||
prev_hashes = {
|
||||
k: encode_base64(v) for k, v in hashes.items()
|
||||
if k == "sha256"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue