summary refs log tree commit diff
path: root/synapse/handlers/message.py
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2018-04-03 15:18:32 +0100
committerGitHub <noreply@github.com>2018-04-03 15:18:32 +0100
commit8da39ad98fbcc9c4d153ad6a32d7e0fed1f9c0ad (patch)
treee9ec751fe38217b35a34a38a01cb7019d261031e /synapse/handlers/message.py
parentMerge pull request #3048 from matrix-org/rav/use_simplejson (diff)
parentFix json encoding bug in replication (diff)
downloadsynapse-8da39ad98fbcc9c4d153ad6a32d7e0fed1f9c0ad.tar.xz
Merge pull request #3049 from matrix-org/rav/use_staticjson
Use static JSONEncoders
Diffstat (limited to 'synapse/handlers/message.py')
-rw-r--r--synapse/handlers/message.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index 5a8ddc253e..6de6e13b7b 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -27,7 +27,7 @@ from synapse.types import (
 from synapse.util.async import run_on_reactor, ReadWriteLock, Limiter
 from synapse.util.logcontext import preserve_fn, run_in_background
 from synapse.util.metrics import measure_func
-from synapse.util.frozenutils import unfreeze
+from synapse.util.frozenutils import frozendict_json_encoder
 from synapse.util.stringutils import random_string
 from synapse.visibility import filter_events_for_client
 from synapse.replication.http.send_event import send_event_to_master
@@ -678,7 +678,7 @@ class EventCreationHandler(object):
 
         # Ensure that we can round trip before trying to persist in db
         try:
-            dump = simplejson.dumps(unfreeze(event.content))
+            dump = frozendict_json_encoder.encode(event.content)
             simplejson.loads(dump)
         except Exception:
             logger.exception("Failed to encode content: %r", event.content)