Merge branch 'develop' of github.com:matrix-org/synapse into erikj/e2e_one_time_upsert

This commit is contained in:
Erik Johnston 2017-03-29 10:57:19 +01:00
commit 4ad613f6be
45 changed files with 831 additions and 596 deletions

View file

@ -193,7 +193,7 @@ class EndToEndKeyStore(SQLBaseStore):
)
txn.execute(sql, (user_id, device_id))
result = {}
for algorithm, key_count in txn.fetchall():
for algorithm, key_count in txn:
result[algorithm] = key_count
return result
return self.runInteraction(
@ -214,7 +214,7 @@ class EndToEndKeyStore(SQLBaseStore):
user_result = result.setdefault(user_id, {})
device_result = user_result.setdefault(device_id, {})
txn.execute(sql, (user_id, device_id, algorithm))
for key_id, key_json in txn.fetchall():
for key_id, key_json in txn:
device_result[algorithm + ":" + key_id] = key_json
delete.append((user_id, device_id, algorithm, key_id))
sql = (