From e8d4a314753bb49f91a2e51d0e442a153f519a64 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 10 Feb 2015 16:36:51 +0000 Subject: Fix prune_events to work with nested dicts --- synapse/events/utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'synapse') diff --git a/synapse/events/utils.py b/synapse/events/utils.py index 4ad37188ba..5bfa820f96 100644 --- a/synapse/events/utils.py +++ b/synapse/events/utils.py @@ -45,12 +45,14 @@ def prune_event(event): "membership", ] + event_dict = event.get_dict() + new_content = {} def add_fields(*fields): for field in fields: if field in event.content: - new_content[field] = event.content[field] + new_content[field] = event_dict["content"][field] if event_type == EventTypes.Member: add_fields("membership") @@ -75,7 +77,7 @@ def prune_event(event): allowed_fields = { k: v - for k, v in event.get_dict().items() + for k, v in event_dict.items() if k in allowed_keys } -- cgit 1.4.1 From b61a308b2725c6e7ab12983d2d05461a532f6405 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 10 Feb 2015 16:37:12 +0000 Subject: Bump version --- VERSION | 2 +- synapse/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'synapse') diff --git a/VERSION b/VERSION index 1648b8029d..f97571ce52 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.6.1e +0.6.1f diff --git a/synapse/__init__.py b/synapse/__init__.py index d3f1c33d3a..329138734a 100644 --- a/synapse/__init__.py +++ b/synapse/__init__.py @@ -16,4 +16,4 @@ """ This is a reference implementation of a synapse home server. """ -__version__ = "0.6.1e" +__version__ = "0.6.1f" -- cgit 1.4.1