summary refs log tree commit diff
path: root/synapse/storage/events.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-10-09 15:39:13 +0100
committerGitHub <noreply@github.com>2019-10-09 15:39:13 +0100
commitdef54134807b797a17f05d33c4f794f13ac6b3e7 (patch)
tree21620381ebe22dc68d8a39b0d1c1d861fc67ddab /synapse/storage/events.py
parentMerge pull request #6178 from matrix-org/babolivier/factor_out_bg_updates (diff)
parentUpdate changelog.d/6185.bugfix (diff)
downloadsynapse-def54134807b797a17f05d33c4f794f13ac6b3e7.tar.xz
Merge pull request #6185 from matrix-org/erikj/fix_censored_evnets
Fix inserting bytes as text in `censor_redactions`
Diffstat (limited to 'synapse/storage/events.py')
-rw-r--r--synapse/storage/events.py6
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