summary refs log tree commit diff
path: root/synapse/storage/_base.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-15 13:26:05 +0100
committerErik Johnston <erik@matrix.org>2014-09-15 13:26:11 +0100
commit5bd9369a62c6d6cf677e9eef7d58096449542cdf (patch)
tree96b9ed79f774a2fc38b5a8345385b0246197087b /synapse/storage/_base.py
parentBF: inviter field has moved to the room root object (diff)
downloadsynapse-5bd9369a62c6d6cf677e9eef7d58096449542cdf.tar.xz
Correctly handle the 'age' key in events and pdus
Diffstat (limited to 'synapse/storage/_base.py')
-rw-r--r--synapse/storage/_base.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py
index 8deaaf93bd..cf88bfc22b 100644
--- a/synapse/storage/_base.py
+++ b/synapse/storage/_base.py
@@ -315,6 +315,10 @@ class SQLBaseStore(object):
         d["content"] = json.loads(d["content"])
         del d["unrecognized_keys"]
 
+        if "age_ts" not in d:
+            # For compatibility
+            d["age_ts"] = d["ts"] if "ts" in d else 0
+
         return self.event_factory.create_event(
             etype=d["type"],
             **d