summary refs log tree commit diff
path: root/synapse/federation
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-15 16:55:39 +0100
committerErik Johnston <erik@matrix.org>2014-09-15 16:55:39 +0100
commit40d2f38abe604525fb03622995c377904f1ea3dd (patch)
treec4c3706c92e57a369d8c313c7289293f4fbc4f85 /synapse/federation
parentCorrectly handle receiving 'missing' Pdus from federation, rather than just d... (diff)
downloadsynapse-40d2f38abe604525fb03622995c377904f1ea3dd.tar.xz
Fix bug where we incorrectly calculated 'age_ts' from 'age' key rather than the reverse. Don't transmit age_ts to clients for now.
Diffstat (limited to '')
-rw-r--r--synapse/federation/replication.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/federation/replication.py b/synapse/federation/replication.py
index a48a7ac15f..96b82f00cb 100644
--- a/synapse/federation/replication.py
+++ b/synapse/federation/replication.py
@@ -292,8 +292,9 @@ class ReplicationLayer(object):
         transaction = Transaction(**transaction_data)
 
         for p in transaction.pdus:
-            if "age_ts" in p:
-                p["age"] = int(self._clock.time_msec()) - int(p["age_ts"])
+            if "age" in p:
+                p["age_ts"] = int(self._clock.time_msec()) - int(p["age"])
+                del p["age"]
 
         pdu_list = [Pdu(**p) for p in transaction.pdus]