mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-29 15:39:00 +03:00
Fix inserting bytes as text
This commit is contained in:
parent
782dd72037
commit
ced4784592
1 changed files with 2 additions and 4 deletions
|
@ -23,7 +23,7 @@ from functools import wraps
|
||||||
from six import iteritems, text_type
|
from six import iteritems, text_type
|
||||||
from six.moves import range
|
from six.moves import range
|
||||||
|
|
||||||
from canonicaljson import encode_canonical_json, json
|
from canonicaljson import json
|
||||||
from prometheus_client import Counter, Histogram
|
from prometheus_client import Counter, Histogram
|
||||||
|
|
||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
|
@ -1632,9 +1632,7 @@ class EventsStore(
|
||||||
and original_event.internal_metadata.is_redacted()
|
and original_event.internal_metadata.is_redacted()
|
||||||
):
|
):
|
||||||
# Redaction was allowed
|
# Redaction was allowed
|
||||||
pruned_json = encode_canonical_json(
|
pruned_json = encode_json(prune_event_dict(original_event.get_dict()))
|
||||||
prune_event_dict(original_event.get_dict())
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
# Redaction wasn't allowed
|
# Redaction wasn't allowed
|
||||||
pruned_json = None
|
pruned_json = None
|
||||||
|
|
Loading…
Reference in a new issue