From fe5c0e23b5adf30144f3eb551dbeceff0e8f74b0 Mon Sep 17 00:00:00 2001 From: Kierre Date: Sat, 25 Oct 2025 21:24:48 -0400 Subject: [PATCH] Use ref hash for incoming v3+ events --- vona/federation/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vona/federation/__init__.py b/vona/federation/__init__.py index 050bc21..fedc2ae 100644 --- a/vona/federation/__init__.py +++ b/vona/federation/__init__.py @@ -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)