summary refs log tree commit diff
path: root/synapse/events/utils.py
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2016-11-21 17:52:45 +0000
committerKegan Dougal <kegan@matrix.org>2016-11-21 17:52:45 +0000
commit70a2157b6458369b374cceeb0e5c8b0d985c6946 (patch)
tree3994e3d3b70069f3d887153a2eb4dfe011838ddf /synapse/events/utils.py
parentMove event_fields filtering to serialize_event (diff)
downloadsynapse-70a2157b6458369b374cceeb0e5c8b0d985c6946.tar.xz
Start adding some tests
Diffstat (limited to 'synapse/events/utils.py')
-rw-r--r--synapse/events/utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/events/utils.py b/synapse/events/utils.py
index 4febd98f43..a14d9bd0ca 100644
--- a/synapse/events/utils.py
+++ b/synapse/events/utils.py
@@ -16,6 +16,8 @@
 from synapse.api.constants import EventTypes
 from . import EventBase
 
+from frozendict import frozendict
+
 import re
 
 # Split strings on "." but not "\." This uses a negative lookbehind assertion for '\'
@@ -130,7 +132,7 @@ def _copy_field(src, dst, field):
     key_to_move = field.pop(-1)
     sub_dict = src
     for sub_field in field:  # e.g. sub_field => "content"
-        if sub_field in sub_dict and type(sub_dict[sub_field]) == dict:
+        if sub_field in sub_dict and type(sub_dict[sub_field]) == frozendict:
             sub_dict = sub_dict[sub_field]
         else:
             return