Refactor PDU definitions to reduce duplication (#2070)

First of all, all PDU definitions were based on the v1 PDU definition with a few fields overwritten to change the format with needed.
While that works when rendering the spec, this is semantically incorrect because it means that the objects must match both schemas, which is impossible.

So now we make a base with only the common fields, and we add the others as needed by the room version.
Note that there is no more "unsigned PDU" definition since it is not used directly, and hashes and signatures are the same across all versions.

Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
Kévin Commaille 2025-03-04 18:08:42 +01:00 committed by GitHub
parent ae06f37470
commit 60339adb2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 190 additions and 283 deletions

View file

@ -0,0 +1 @@
Refactor PDU definitions to reduce duplication.