summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2017-12-31 17:47:11 +0000
committerHubert Chathi <hubert@uhoreg.ca>2018-08-12 19:14:31 -0400
commitfe87890b18f57f0268bd65aeca881e7817bbe9e4 (patch)
tree3e1756411d5c395a3567aff3c5011fde33cf1c71 /synapse/storage
parentlinting (diff)
downloadsynapse-fe87890b18f57f0268bd65aeca881e7817bbe9e4.tar.xz
implement remaining tests and make them work
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/e2e_room_keys.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/storage/e2e_room_keys.py b/synapse/storage/e2e_room_keys.py
index e4d56b7c37..8e8e4e457c 100644
--- a/synapse/storage/e2e_room_keys.py
+++ b/synapse/storage/e2e_room_keys.py
@@ -58,6 +58,7 @@ class EndToEndRoomKeyStore(SQLBaseStore):
 
         defer.returnValue(row)
 
+    @defer.inlineCallbacks
     def set_e2e_room_key(self, user_id, version, room_id, session_id, room_key):
         """Replaces or inserts the encrypted E2E room key for a given session in
         a given backup
@@ -135,7 +136,7 @@ class EndToEndRoomKeyStore(SQLBaseStore):
             desc="get_e2e_room_keys",
         )
 
-        sessions = {}
+        sessions = { 'rooms': {} }
         for row in rows:
             room_entry = sessions['rooms'].setdefault(row['room_id'], {"sessions": {}})
             room_entry['sessions'][row['session_id']] = {