diff options
author | Erik Johnston <erikj@jki.re> | 2017-10-11 13:18:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-11 13:18:52 +0100 |
commit | bc7f3eb32f99d77ac6d980313e80c85b2e310943 (patch) | |
tree | d5464721b2bb278509e8287d6dd1bac27c125df1 /synapse | |
parent | Merge pull request #2490 from matrix-org/erikj/drop_left_room_events (diff) | |
parent | Unfreeze event before serializing with ujson (diff) | |
download | synapse-bc7f3eb32f99d77ac6d980313e80c85b2e310943.tar.xz |
Merge pull request #2483 from jeremycline/unfreeze-ujson-dump
Unfreeze event before serializing with ujson
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/handlers/message.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index ca8c6c55bb..eb7e052ba6 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -25,6 +25,7 @@ from synapse.types import ( from synapse.util.async import run_on_reactor, ReadWriteLock, Limiter from synapse.util.logcontext import preserve_fn from synapse.util.metrics import measure_func +from synapse.util.frozenutils import unfreeze from synapse.visibility import filter_events_for_client from ._base import BaseHandler @@ -555,7 +556,7 @@ class MessageHandler(BaseHandler): # Ensure that we can round trip before trying to persist in db try: - dump = ujson.dumps(event.content) + dump = ujson.dumps(unfreeze(event.content)) ujson.loads(dump) except: logger.exception("Failed to encode content: %r", event.content) |