diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-01-26 18:53:31 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-01-26 18:53:31 +0000 |
commit | 436513068de73ab47d9ba9a32046420be3d86588 (patch) | |
tree | 07fb90a26067ed1f015ff77aa659d9a9d3104b8d /synapse/events/utils.py | |
parent | Merge branch 'develop' into client_v2_sync (diff) | |
download | synapse-436513068de73ab47d9ba9a32046420be3d86588.tar.xz |
Start implementing the non-incremental sync portion of the v2 /sync API
Diffstat (limited to 'synapse/events/utils.py')
-rw-r--r-- | synapse/events/utils.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/events/utils.py b/synapse/events/utils.py index e391aca4cc..b7f1ad4b40 100644 --- a/synapse/events/utils.py +++ b/synapse/events/utils.py @@ -89,7 +89,7 @@ def prune_event(event): return type(event)(allowed_fields) -def serialize_event(e, time_now_ms, client_event=True): +def serialize_event(e, time_now_ms, client_event=True, strip_ids=False): # FIXME(erikj): To handle the case of presence events and the like if not isinstance(e, EventBase): return e @@ -138,4 +138,8 @@ def serialize_event(e, time_now_ms, client_event=True): d.pop("unsigned", None) d.pop("origin", None) + if strip_ids: + d.pop("room_id", None) + d.pop("event_id", None) + return d |