Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
8c0ff028
Commit
8c0ff028
authored
6 years ago
by
David Baker
Browse files
Options
Downloads
Patches
Plain Diff
Linting soothes the savage PEP8 monster
parent
306361b3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/handlers/e2e_room_keys.py
+9
-4
9 additions, 4 deletions
synapse/handlers/e2e_room_keys.py
with
9 additions
and
4 deletions
synapse/handlers/e2e_room_keys.py
+
9
−
4
View file @
8c0ff028
...
...
@@ -53,7 +53,8 @@ class E2eRoomKeysHandler(object):
user_id(str): the user whose keys we
'
re getting
version(str): the version ID of the backup we
'
re getting keys from
room_id(string): room ID to get keys for, for None to get keys for all rooms
session_id(string): session ID to get keys for, for None to get keys for all sessions
session_id(string): session ID to get keys for, for None to get keys for all
sessions
Returns:
A deferred list of dicts giving the session_data and message metadata for
these room keys.
...
...
@@ -80,8 +81,10 @@ class E2eRoomKeysHandler(object):
Args:
user_id(str): the user whose backup we
'
re deleting
version(str): the version ID of the backup we
'
re deleting
room_id(string): room ID to delete keys for, for None to delete keys for all rooms
session_id(string): session ID to delete keys for, for None to delete keys for all sessions
room_id(string): room ID to delete keys for, for None to delete keys for all
rooms
session_id(string): session ID to delete keys for, for None to delete keys
for all sessions
Returns:
A deferred of the deletion transaction
"""
...
...
@@ -138,7 +141,9 @@ class E2eRoomKeysHandler(object):
if
version_info
[
'
version
'
]
!=
version
:
# Check that the version we're trying to upload actually exists
try
:
version_info
=
yield
self
.
store
.
get_e2e_room_keys_version_info
(
user_id
,
version
)
version_info
=
yield
self
.
store
.
get_e2e_room_keys_version_info
(
user_id
,
version
,
)
# if we get this far, the version must exist
raise
RoomKeysVersionError
(
current_version
=
version_info
[
'
version
'
])
except
StoreError
as
e
:
...
...
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