summary refs log tree commit diff
path: root/synapse/storage/_base.py
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2014-09-15 15:27:58 +0100
committerKegan Dougal <kegan@matrix.org>2014-09-15 15:27:58 +0100
commit14bc4ed59f0d98e80db96ed8232983f814082305 (patch)
tree27e70665764b41f5f16f8662eb1328e2ba20aba7 /synapse/storage/_base.py
parentUpdate spec to include m.login.email.identity (diff)
parentCorrectly handle the 'age' key in events and pdus (diff)
downloadsynapse-14bc4ed59f0d98e80db96ed8232983f814082305.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into registration-api-changes in preparation for re-merge to develop.
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