0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-13 22:13:29 +01:00
This commit is contained in:
Richard van der Hoff 2016-08-03 14:57:46 +01:00
parent 68264d7404
commit 98385888b8
2 changed files with 10 additions and 12 deletions

View file

@ -63,16 +63,16 @@ class EndToEndKeyStore(SQLBaseStore):
query_clauses.append(query_clause) query_clauses.append(query_clause)
sql = ( sql = (
"SELECT k.user_id, k.device_id, " "SELECT k.user_id, k.device_id, "
" d.display_name AS device_display_name, " " d.display_name AS device_display_name, "
" k.key_json" " k.key_json"
" FROM e2e_device_keys_json k" " FROM e2e_device_keys_json k"
" LEFT JOIN devices d ON d.user_id = k.user_id" " LEFT JOIN devices d ON d.user_id = k.user_id"
" AND d.device_id = k.device_id" " AND d.device_id = k.device_id"
" WHERE %s" " WHERE %s"
) % ( ) % (
" OR ".join("("+q+")" for q in query_clauses) " OR ".join("(" + q + ")" for q in query_clauses)
) )
txn.execute(sql, query_params) txn.execute(sql, query_params)
rows = self.cursor_to_dict(txn) rows = self.cursor_to_dict(txn)

View file

@ -15,7 +15,6 @@
from twisted.internet import defer from twisted.internet import defer
import synapse.api.errors
import tests.unittest import tests.unittest
import tests.utils import tests.utils
@ -68,7 +67,6 @@ class EndToEndKeyStoreTestCase(tests.unittest.TestCase):
"device_display_name": "display_name", "device_display_name": "display_name",
}, dev) }, dev)
@defer.inlineCallbacks @defer.inlineCallbacks
def test_multiple_devices(self): def test_multiple_devices(self):
now = 1470174257070 now = 1470174257070