summary refs log tree commit diff
path: root/synapse/events
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-01-13 09:57:32 +0000
committerErik Johnston <erik@matrix.org>2015-01-13 09:57:32 +0000
commit39585bf5560e64bf6fca7d043cc3357b5dba59de (patch)
tree7ee168893e418dcb32c11b4fde93fa7b3016f85c /synapse/events
parentMerge branch 'hotfixes-v0.6.1' (diff)
downloadsynapse-39585bf5560e64bf6fca7d043cc3357b5dba59de.tar.xz
Insert 'age' into top level when returning events to clients
Diffstat (limited to 'synapse/events')
-rw-r--r--synapse/events/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/events/utils.py b/synapse/events/utils.py
index 4f4914467c..4ad37188ba 100644
--- a/synapse/events/utils.py
+++ b/synapse/events/utils.py
@@ -98,7 +98,7 @@ def serialize_event(hs, e):
     d = {k: v for k, v in e.get_dict().items()}
     if "age_ts" in d["unsigned"]:
         now = int(hs.get_clock().time_msec())
-        d["unsigned"]["age"] = now - d["unsigned"]["age_ts"]
+        d["age"] = now - d["unsigned"]["age_ts"]
         del d["unsigned"]["age_ts"]
 
     d["user_id"] = d.pop("sender", None)