summary refs log tree commit diff
path: root/synapse/federation/persistence.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-02-11 15:44:28 +0000
committerErik Johnston <erik@matrix.org>2015-02-11 15:44:28 +0000
commitddb816cf60ca1b0c0f9bfab5df233a010ac309a3 (patch)
treec3db58914617f2375c603f6c5d1eb8ca5d2600b2 /synapse/federation/persistence.py
parentBlunty replace json with simplejson (diff)
downloadsynapse-ddb816cf60ca1b0c0f9bfab5df233a010ac309a3.tar.xz
Don't unfreeze when using FreezeEvent.get_dict, as we are using a JSONEncoder that understands FrozenDict
Diffstat (limited to 'synapse/federation/persistence.py')
-rw-r--r--synapse/federation/persistence.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/federation/persistence.py b/synapse/federation/persistence.py
index 8a1afc0ca5..76a9dcd777 100644
--- a/synapse/federation/persistence.py
+++ b/synapse/federation/persistence.py
@@ -23,7 +23,8 @@ from twisted.internet import defer
 
 from synapse.util.logutils import log_function
 
-import simplejson as json
+from syutil.jsonutil import encode_canonical_json
+
 import logging
 
 
@@ -70,7 +71,7 @@ class TransactionActions(object):
             transaction.transaction_id,
             transaction.origin,
             code,
-            json.dumps(response)
+            encode_canonical_json(response)
         )
 
     @defer.inlineCallbacks
@@ -100,5 +101,5 @@ class TransactionActions(object):
             transaction.transaction_id,
             transaction.destination,
             response_code,
-            json.dumps(response_dict)
+            encode_canonical_json(response_dict)
         )