diff options
author | Erik Johnston <erik@matrix.org> | 2014-12-10 14:02:48 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-12-10 14:02:48 +0000 |
commit | 02db7eb209af879a0168a371b4cb1c2ad0fcab49 (patch) | |
tree | 27535103af5903aa66c4561c02cbc24f5a013fd7 /synapse/storage/__init__.py | |
parent | Merge branch 'develop' of github.com:matrix-org/synapse into events_refactor (diff) | |
download | synapse-02db7eb209af879a0168a371b4cb1c2ad0fcab49.tar.xz |
Fix bug when uploading state with empty state_key
Diffstat (limited to 'synapse/storage/__init__.py')
-rw-r--r-- | synapse/storage/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py index 7068424441..f8d895082d 100644 --- a/synapse/storage/__init__.py +++ b/synapse/storage/__init__.py @@ -39,6 +39,7 @@ from .state import StateStore from .signatures import SignatureStore from syutil.base64util import decode_base64 +from syutil.jsonutil import encode_canonical_json from synapse.crypto.event_signing import compute_event_reference_hash @@ -162,7 +163,8 @@ class DataStore(RoomMemberStore, RoomStore, table="event_json", values={ "event_id": event.event_id, - "json": json.dumps(event_dict, separators=(',', ':')), + "room_id": event.room_id, + "json": encode_canonical_json(event_dict), }, or_replace=True, ) |