mirror of
https://github.com/element-hq/synapse.git
synced 2024-11-26 19:47:05 +03:00
Decrank last commit
This commit is contained in:
parent
4ad613f6be
commit
e4df0e189d
1 changed files with 5 additions and 4 deletions
|
@ -150,10 +150,11 @@ class EndToEndKeyStore(SQLBaseStore):
|
||||||
new_keys = [] # Keys that we need to insert
|
new_keys = [] # Keys that we need to insert
|
||||||
for algorithm, key_id, json_bytes in key_list:
|
for algorithm, key_id, json_bytes in key_list:
|
||||||
ex_bytes = existing_key_map.get((algorithm, key_id), None)
|
ex_bytes = existing_key_map.get((algorithm, key_id), None)
|
||||||
if ex_bytes and json_bytes != ex_bytes:
|
if ex_bytes:
|
||||||
raise SynapseError(
|
if json_bytes != ex_bytes:
|
||||||
400, "One time key with key_id %r already exists" % (key_id,)
|
raise SynapseError(
|
||||||
)
|
400, "One time key with key_id %r already exists" % (key_id,)
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
new_keys.append((algorithm, key_id, json_bytes))
|
new_keys.append((algorithm, key_id, json_bytes))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue