diff options
author | Hubert Chathi <hubert@uhoreg.ca> | 2018-08-21 14:51:34 -0400 |
---|---|---|
committer | Hubert Chathi <hubert@uhoreg.ca> | 2018-08-21 14:51:34 -0400 |
commit | 42a394caa2884096e5afe1f1c2c75680792769d8 (patch) | |
tree | 5116a9d96989d03253d6daf4f8e7f06ffc85a657 /synapse/storage/e2e_room_keys.py | |
parent | allow auth_data to be any JSON instead of a string (diff) | |
download | synapse-42a394caa2884096e5afe1f1c2c75680792769d8.tar.xz |
allow session_data to be any JSON instead of just a string
Diffstat (limited to 'synapse/storage/e2e_room_keys.py')
-rw-r--r-- | synapse/storage/e2e_room_keys.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/storage/e2e_room_keys.py b/synapse/storage/e2e_room_keys.py index c7b1fad21e..b695570a7b 100644 --- a/synapse/storage/e2e_room_keys.py +++ b/synapse/storage/e2e_room_keys.py @@ -58,6 +58,8 @@ class EndToEndRoomKeyStore(SQLBaseStore): desc="get_e2e_room_key", ) + row["session_data"] = json.loads(row["session_data"]); + defer.returnValue(row) @defer.inlineCallbacks @@ -87,7 +89,7 @@ class EndToEndRoomKeyStore(SQLBaseStore): "first_message_index": room_key['first_message_index'], "forwarded_count": room_key['forwarded_count'], "is_verified": room_key['is_verified'], - "session_data": room_key['session_data'], + "session_data": json.dumps(room_key['session_data']), }, lock=False, ) @@ -145,7 +147,7 @@ class EndToEndRoomKeyStore(SQLBaseStore): "first_message_index": row["first_message_index"], "forwarded_count": row["forwarded_count"], "is_verified": row["is_verified"], - "session_data": row["session_data"], + "session_data": json.loads(row["session_data"]), } defer.returnValue(sessions) |