diff options
author | Mark Haines <mark.haines@matrix.org> | 2014-10-17 16:50:04 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2014-10-17 16:50:04 +0100 |
commit | c5cec1cc77029c21f0117c318c522ab320de3923 (patch) | |
tree | e7d3a36d1db4935f306f4354bed59bfc92ea2828 /synapse/federation/replication.py | |
parent | move 'age' into 'meta' subdict so that it is clearer that it is not part of t... (diff) | |
download | synapse-c5cec1cc77029c21f0117c318c522ab320de3923.tar.xz |
Rename 'meta' to 'unsigned'
Diffstat (limited to 'synapse/federation/replication.py')
-rw-r--r-- | synapse/federation/replication.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/synapse/federation/replication.py b/synapse/federation/replication.py index c4993aa5ee..f2a5d4d5e2 100644 --- a/synapse/federation/replication.py +++ b/synapse/federation/replication.py @@ -295,10 +295,10 @@ class ReplicationLayer(object): transaction = Transaction(**transaction_data) for p in transaction.pdus: - if "meta" in p: - meta = p["meta"] - if "age" in meta: - p["age"] = meta["age"] + if "unsigned" in p: + unsigned = p["unsigned"] + if "age" in unsigned: + p["age"] = unsigned["age"] if "age" in p: p["age_ts"] = int(self._clock.time_msec()) - int(p["age"]) del p["age"] @@ -422,7 +422,7 @@ class ReplicationLayer(object): for p in pdus: if "age_ts" in p: age = time_now - p["age_ts"] - p.setdefault("meta", {})["age"] = int(age) + p.setdefault("unsigned", {})["age"] = int(age) del p["age_ts"] return Transaction( origin=self.server_name, @@ -620,8 +620,8 @@ class _TransactionQueue(object): if "pdus" in data: for p in data["pdus"]: if "age_ts" in p: - meta = p.setdefault("meta", {}) - meta["age"] = now - int(p["age_ts"]) + unsigned = p.setdefault("unsigned", {}) + unsigned["age"] = now - int(p["age_ts"]) del p["age_ts"] return data |