mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-22 09:35:45 +03:00
Don't strip out null's in serialized events, as that is not need anymore and it's not in the spec (yet)
This commit is contained in:
parent
69ddec6589
commit
dcadfbbd4a
1 changed files with 2 additions and 1 deletions
|
@ -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"]
|
||||
|
|
Loading…
Reference in a new issue