summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorKrombel <krombel@krombel.de>2017-06-21 14:48:12 +0200
committerKrombel <krombel@krombel.de>2017-06-21 14:48:12 +0200
commit812c030e87f4a31e13496dbf2fa0c2e61aa918d2 (patch)
tree432c806f2efdac0973820304ce2f0b8c641016ce /synapse
parentMerge branch 'develop' into avoid_duplicate_filters (diff)
downloadsynapse-812c030e87f4a31e13496dbf2fa0c2e61aa918d2.tar.xz
replaced json.dumps with encode_canonical_json
Diffstat (limited to '')
-rw-r--r--synapse/storage/filtering.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/storage/filtering.py b/synapse/storage/filtering.py

index 73f7a078fa..78b1e30945 100644 --- a/synapse/storage/filtering.py +++ b/synapse/storage/filtering.py
@@ -19,6 +19,7 @@ from ._base import SQLBaseStore from synapse.api.errors import SynapseError, Codes from synapse.util.caches.descriptors import cachedInlineCallbacks +from canonicaljson import encode_canonical_json import simplejson as json @@ -46,7 +47,7 @@ class FilteringStore(SQLBaseStore): defer.returnValue(json.loads(str(def_json).decode("utf-8"))) def add_user_filter(self, user_localpart, user_filter): - def_json = json.dumps(user_filter).encode("utf-8") + def_json = encode_canonical_json(user_filter) # Need an atomic transaction to SELECT the maximal ID so far then # INSERT a new one