summary refs log tree commit diff
path: root/synapse/events
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-01-29 16:50:23 +0000
committerErik Johnston <erik@matrix.org>2015-01-29 16:52:33 +0000
commit78015948a7febb18e000651f72f8f58830a55b93 (patch)
tree42aac1eb30b723f21074bb814f33d8713008725a /synapse/events
parentMake post_json(...) actually send data. (diff)
downloadsynapse-78015948a7febb18e000651f72f8f58830a55b93.tar.xz
Initial implementation of auth conflict resolution
Diffstat (limited to 'synapse/events')
-rw-r--r--synapse/events/utils.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/events/utils.py b/synapse/events/utils.py
index bcb5457278..10a6b9f264 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
     }