diff options
author | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-09-15 14:15:10 +0100 |
---|---|---|
committer | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-09-15 14:15:10 +0100 |
commit | b0406b9ead0e3b726ef2c675181d040ca392e85d (patch) | |
tree | 42fdeee7d4b5eb283f6a406463499ae05b9e5ffe /synapse/storage/_base.py | |
parent | Merge remote-tracking branch 'origin/develop' into test-sqlite-memory (diff) | |
parent | Correctly handle the 'age' key in events and pdus (diff) | |
download | synapse-b0406b9ead0e3b726ef2c675181d040ca392e85d.tar.xz |
Merge remote-tracking branch 'origin/develop' into test-sqlite-memory
Diffstat (limited to 'synapse/storage/_base.py')
-rw-r--r-- | synapse/storage/_base.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py index efec111691..76ed7d06fb 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py @@ -355,6 +355,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 |