diff options
author | Erik Johnston <erik@matrix.org> | 2019-10-08 14:31:43 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2019-10-08 16:18:43 +0100 |
commit | ced4784592ab6b9080ec1d6c7aa2664a42b3a38e (patch) | |
tree | e54146a6ef5af7af35ab9e5bd3ffcbecb73f0ad2 /synapse/storage/events.py | |
parent | Merge tag 'v1.4.0' (diff) | |
download | synapse-ced4784592ab6b9080ec1d6c7aa2664a42b3a38e.tar.xz |
Fix inserting bytes as text
Diffstat (limited to 'synapse/storage/events.py')
-rw-r--r-- | synapse/storage/events.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py index 2e485c8644..bb6ff0595a 100644 --- a/synapse/storage/events.py +++ b/synapse/storage/events.py @@ -23,7 +23,7 @@ from functools import wraps from six import iteritems, text_type from six.moves import range -from canonicaljson import encode_canonical_json, json +from canonicaljson import json from prometheus_client import Counter, Histogram from twisted.internet import defer @@ -1632,9 +1632,7 @@ class EventsStore( and original_event.internal_metadata.is_redacted() ): # Redaction was allowed - pruned_json = encode_canonical_json( - prune_event_dict(original_event.get_dict()) - ) + pruned_json = encode_json(prune_event_dict(original_event.get_dict())) else: # Redaction wasn't allowed pruned_json = None |