Use ref hash for incoming v3+ events

This commit is contained in:
2025-10-25 21:24:48 -04:00
parent 09cb708594
commit fe5c0e23b5

View File

@@ -209,7 +209,13 @@ async def receive_txn(txnId):
if "pdus" in parsed_data:
for pdu in parsed_data["pdus"]:
if "event_id" in pdu:
response["pdus"][pdu["event_id"]] = {}
# For v1 and v2 rooms
event_id = pdu["event_id"]
else:
# Assume room v4 or over as most rooms will be anyway
event_id = globals.make_ref_hash(pdu, 4)
response["pdus"][event_id] = {}
return jsonify(response)