summary refs log tree commit diff
path: root/synapse/api/events
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-25 16:59:26 +0100
committerErik Johnston <erik@matrix.org>2014-09-25 17:00:17 +0100
commitdcadfbbd4a829a097c49c7b919a9429c3ca05de5 (patch)
tree3b5e6cbe06ade881a30d3bb44b9dd8ad7bbb2739 /synapse/api/events
parentDon't strip of False values from events when serializing (diff)
downloadsynapse-dcadfbbd4a829a097c49c7b919a9429c3ca05de5.tar.xz
Don't strip out null's in serialized events, as that is not need anymore and it's not in the spec (yet)
Diffstat (limited to 'synapse/api/events')
-rw-r--r--synapse/api/events/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/api/events/__init__.py b/synapse/api/events/__init__.py
index db6dff5762..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 = {k: v for k, v in e.get_dict().items() if v is not None}
+    # 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"]