diff options
author | Hubert Chathi <hubert@uhoreg.ca> | 2019-10-18 10:56:54 +0100 |
---|---|---|
committer | Hubert Chathi <hubert@uhoreg.ca> | 2019-10-18 10:56:54 +0100 |
commit | f0f6a2b360829e0ba13dec239c586e95d46d60b4 (patch) | |
tree | fe99bfddfd39577f0d56f9c06f0d2190be5da004 /synapse | |
parent | Merge branch 'develop' into uhoreg/e2e_cross-signing_merged (diff) | |
download | synapse-f0f6a2b360829e0ba13dec239c586e95d46d60b4.tar.xz |
use the right function for when we're already in runInteraction
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/storage/end_to_end_keys.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/storage/end_to_end_keys.py b/synapse/storage/end_to_end_keys.py index 8ce5dd8bf9..3c82f789fa 100644 --- a/synapse/storage/end_to_end_keys.py +++ b/synapse/storage/end_to_end_keys.py @@ -346,7 +346,8 @@ class EndToEndKeyStore(EndToEndKeyWorkerStore, SQLBaseStore): # The "keys" property must only have one entry, which will be the public # key, so we just grab the first value in there pubkey = next(iter(key["keys"].values())) - self._simple_insert( + self._simple_insert_txn( + txn, "devices", values={ "user_id": user_id, @@ -354,12 +355,12 @@ class EndToEndKeyStore(EndToEndKeyWorkerStore, SQLBaseStore): "display_name": key_type + " signing key", "hidden": True, }, - desc="store_master_key_device", ) # and finally, store the key itself with self._cross_signing_id_gen.get_next() as stream_id: - self._simple_insert( + self._simple_insert_txn( + txn, "e2e_cross_signing_keys", values={ "user_id": user_id, @@ -367,7 +368,6 @@ class EndToEndKeyStore(EndToEndKeyWorkerStore, SQLBaseStore): "keydata": json.dumps(key), "stream_id": stream_id, }, - desc="store_master_key", ) def set_e2e_cross_signing_key(self, user_id, key_type, key): |