diff options
author | Mark Haines <mark.haines@matrix.org> | 2014-10-17 15:27:11 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2014-10-17 15:27:11 +0100 |
commit | 4d1a7624f444deee4352645fbf73165e11f66dd0 (patch) | |
tree | 466430a20a59e4dc78bf5d29c652e4015403af49 /synapse/federation/units.py | |
parent | Hash the same content covered by the signature when referencing previous PDUs... (diff) | |
download | synapse-4d1a7624f444deee4352645fbf73165e11f66dd0.tar.xz |
move 'age' into 'meta' subdict so that it is clearer that it is not part of the signed data
Diffstat (limited to 'synapse/federation/units.py')
-rw-r--r-- | synapse/federation/units.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/federation/units.py b/synapse/federation/units.py index 6a43007837..c4a10a4123 100644 --- a/synapse/federation/units.py +++ b/synapse/federation/units.py @@ -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"] |