diff options
author | David Baker <dave@matrix.org> | 2015-05-07 09:33:42 +0100 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2015-05-07 09:33:42 +0100 |
commit | 97a64f3ebeaac9d9e97699f41751e272fc0c1c73 (patch) | |
tree | 30369edfc0af5da6f41f32932936ec363e844787 /synapse/storage/transactions.py | |
parent | Typo (diff) | |
parent | Optional profiling using cProfile (diff) | |
download | synapse-97a64f3ebeaac9d9e97699f41751e272fc0c1c73.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into develop
Diffstat (limited to 'synapse/storage/transactions.py')
-rw-r--r-- | synapse/storage/transactions.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/storage/transactions.py b/synapse/storage/transactions.py index 89dd7d8947..624da4a9dc 100644 --- a/synapse/storage/transactions.py +++ b/synapse/storage/transactions.py @@ -17,6 +17,7 @@ from ._base import SQLBaseStore, cached from collections import namedtuple +from syutil.jsonutil import encode_canonical_json import logging logger = logging.getLogger(__name__) @@ -82,7 +83,7 @@ class TransactionStore(SQLBaseStore): "transaction_id": transaction_id, "origin": origin, "response_code": code, - "response_json": response_dict, + "response_json": buffer(encode_canonical_json(response_dict)), }, or_ignore=True, desc="set_received_txn_response", @@ -161,7 +162,8 @@ class TransactionStore(SQLBaseStore): return self.runInteraction( "delivered_txn", self._delivered_txn, - transaction_id, destination, code, response_dict + transaction_id, destination, code, + buffer(encode_canonical_json(response_dict)), ) def _delivered_txn(self, txn, transaction_id, destination, |