mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:06:08 -04:00
move 'age' into 'meta' subdict so that it is clearer that it is not part of the signed data
This commit is contained in:
parent
c8f996e29f
commit
4d1a7624f4
2 changed files with 19 additions and 7 deletions
|
@ -68,11 +68,11 @@ class Pdu(JsonEncodedObject):
|
|||
"signatures",
|
||||
"is_state", # Below this are keys valid only for State Pdus.
|
||||
"state_key",
|
||||
"power_level",
|
||||
"prev_state_id",
|
||||
"prev_state_origin",
|
||||
"required_power_level",
|
||||
"user_id",
|
||||
"meta"
|
||||
]
|
||||
|
||||
internal_keys = [
|
||||
|
@ -124,6 +124,10 @@ class Pdu(JsonEncodedObject):
|
|||
if pdu_tuple:
|
||||
d = copy.copy(pdu_tuple.pdu_entry._asdict())
|
||||
|
||||
for k in d.keys():
|
||||
if d[k] is None:
|
||||
del d[k]
|
||||
|
||||
d["content"] = json.loads(d["content_json"])
|
||||
del d["content_json"]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue