summary refs log tree commit diff
path: root/synapse/api/events/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-25 17:02:53 +0100
committerErik Johnston <erik@matrix.org>2014-09-25 17:02:53 +0100
commit37bfe44046d46effba5f86b65ab37fa0d0c505b0 (patch)
tree9524fd5e5ac1637982549030a2759aaf538e8ac2 /synapse/api/events/__init__.py
parentfix rst warnings (diff)
parentDon't strip out null's in serialized events, as that is not need anymore and ... (diff)
downloadsynapse-37bfe44046d46effba5f86b65ab37fa0d0c505b0.tar.xz
Merge branch 'deletions' of github.com:matrix-org/synapse into develop
Diffstat (limited to 'synapse/api/events/__init__.py')
-rw-r--r--synapse/api/events/__init__.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/api/events/__init__.py b/synapse/api/events/__init__.py
index 0cee196851..f66fea2904 100644
--- a/synapse/api/events/__init__.py
+++ b/synapse/api/events/__init__.py
@@ -22,7 +22,8 @@ def serialize_event(hs, e):
     if not isinstance(e, SynapseEvent):
         return e
 
-    d = e.get_dict()
+    # Should this strip out None's?
+    d = {k: v for k, v in e.get_dict().items()}
     if "age_ts" in d:
         d["age"] = int(hs.get_clock().time_msec()) - d["age_ts"]
         del d["age_ts"]
@@ -58,17 +59,19 @@ class SynapseEvent(JsonEncodedObject):
         "required_power_level",
         "age_ts",
         "prev_content",
+        "prev_state",
+        "redacted_because",
     ]
 
     internal_keys = [
         "is_state",
         "prev_events",
-        "prev_state",
         "depth",
         "destinations",
         "origin",
         "outlier",
         "power_level",
+        "redacted",
     ]
 
     required_keys = [