From dcadfbbd4a829a097c49c7b919a9429c3ca05de5 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Thu, 25 Sep 2014 16:59:26 +0100 Subject: [PATCH] Don't strip out null's in serialized events, as that is not need anymore and it's not in the spec (yet) --- synapse/api/events/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/synapse/api/events/__init__.py b/synapse/api/events/__init__.py index db6dff576..f66fea290 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"]