summary refs log tree commit diff
path: root/synapse/api/events/__init__.py
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2014-09-17 18:27:47 +0100
committerPaul "LeoNerd" Evans <paul@matrix.org>2014-09-17 18:27:47 +0100
commit4571cf7baadf360e27e05a73142571da9f165d47 (patch)
treeed5850f285a35df2353b3562ed4bca1fd34d5324 /synapse/api/events/__init__.py
parentRemark on remaining storage modules that still need unit tests (diff)
parentWEB-35: joins/parts should trigger desktop notifications (diff)
downloadsynapse-4571cf7baadf360e27e05a73142571da9f165d47.tar.xz
Merge branch 'develop' into test-sqlite-memory
Diffstat (limited to 'synapse/api/events/__init__.py')
-rw-r--r--synapse/api/events/__init__.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/synapse/api/events/__init__.py b/synapse/api/events/__init__.py
index 4fe0608016..0cee196851 100644
--- a/synapse/api/events/__init__.py
+++ b/synapse/api/events/__init__.py
@@ -25,6 +25,7 @@ def serialize_event(hs, e):
     d = e.get_dict()
     if "age_ts" in d:
         d["age"] = int(hs.get_clock().time_msec()) - d["age_ts"]
+        del d["age_ts"]
 
     return d
 
@@ -56,6 +57,7 @@ class SynapseEvent(JsonEncodedObject):
         "state_key",
         "required_power_level",
         "age_ts",
+        "prev_content",
     ]
 
     internal_keys = [
@@ -172,10 +174,6 @@ class SynapseEvent(JsonEncodedObject):
 
 class SynapseStateEvent(SynapseEvent):
 
-    valid_keys = SynapseEvent.valid_keys + [
-        "prev_content",
-    ]
-
     def __init__(self, **kwargs):
         if "state_key" not in kwargs:
             kwargs["state_key"] = ""