Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
98385888
Commit
98385888
authored
8 years ago
by
Richard van der Hoff
Browse files
Options
Downloads
Patches
Plain Diff
PEP8
parent
68264d74
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
synapse/storage/end_to_end_keys.py
+10
-10
10 additions, 10 deletions
synapse/storage/end_to_end_keys.py
tests/storage/test_end_to_end_keys.py
+0
-2
0 additions, 2 deletions
tests/storage/test_end_to_end_keys.py
with
10 additions
and
12 deletions
synapse/storage/end_to_end_keys.py
+
10
−
10
View file @
98385888
...
...
@@ -63,16 +63,16 @@ class EndToEndKeyStore(SQLBaseStore):
query_clauses
.
append
(
query_clause
)
sql
=
(
"
SELECT k.user_id, k.device_id,
"
"
d.display_name AS device_display_name,
"
"
k.key_json
"
"
FROM e2e_device_keys_json k
"
"
LEFT JOIN devices d ON d.user_id = k.user_id
"
"
AND d.device_id = k.device_id
"
"
WHERE %s
"
)
%
(
"
OR
"
.
join
(
"
(
"
+
q
+
"
)
"
for
q
in
query_clauses
)
)
"
SELECT k.user_id, k.device_id,
"
"
d.display_name AS device_display_name,
"
"
k.key_json
"
"
FROM e2e_device_keys_json k
"
"
LEFT JOIN devices d ON d.user_id = k.user_id
"
"
AND d.device_id = k.device_id
"
"
WHERE %s
"
)
%
(
"
OR
"
.
join
(
"
(
"
+
q
+
"
)
"
for
q
in
query_clauses
)
)
txn
.
execute
(
sql
,
query_params
)
rows
=
self
.
cursor_to_dict
(
txn
)
...
...
This diff is collapsed.
Click to expand it.
tests/storage/test_end_to_end_keys.py
+
0
−
2
View file @
98385888
...
...
@@ -15,7 +15,6 @@
from
twisted.internet
import
defer
import
synapse.api.errors
import
tests.unittest
import
tests.utils
...
...
@@ -68,7 +67,6 @@ class EndToEndKeyStoreTestCase(tests.unittest.TestCase):
"
device_display_name
"
:
"
display_name
"
,
},
dev
)
@defer.inlineCallbacks
def
test_multiple_devices
(
self
):
now
=
1470174257070
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment