only remove event_id field in room v1 and v2

no this doesnt make those rooms work,
just a why not thing

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-03-24 21:07:04 -04:00 committed by June
parent 0863bec098
commit 4be37fbe8d
5 changed files with 70 additions and 15 deletions

View file

@ -666,7 +666,13 @@ impl Service {
Error::bad_database("Failed to convert PDU to canonical JSON.")
})?;
pdu_json.remove("event_id");
// room v3 and above removed the "event_id" field from remote PDU format
match room_version_id {
RoomVersionId::V1 | RoomVersionId::V2 => {},
_ => {
pdu_json.remove("event_id");
},
};
// Add origin because synapse likes that (and it's required in the spec)
pdu_json.insert(