Use ref hash for incoming v3+ events
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user