Apply suggestions from code review

Co-Authored-By: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This commit is contained in:
Hubert Chathi 2019-08-31 15:46:49 -07:00 committed by GitHub
parent 72fb8ac9c8
commit e9d587d0d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 7 deletions

View file

@ -1 +1 @@
Add hash and count fields key backup endpoints to help clients guess if there are new keys.
Add hash and count fields to key backup endpoints to help clients guess if there are new keys.

View file

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2017, 2018 New Vector Ltd
# Copyright 2019 Matrix.org Foundation CIC
# Copyright 2019 Matrix.org Foundation C.I.C.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.

View file

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# Copyright 2017 New Vector Ltd
# Copyright 2019 Matrix.org Foundation CIC
# Copyright 2019 Matrix.org Foundation C.I.C.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -156,7 +156,7 @@ class EndToEndRoomKeyStore(SQLBaseStore):
want to query
Returns:
dict[dict[dict]]: a map of room IDs to session IDs to room key
Deferred[dict[dict[dict]]]: a map of room IDs to session IDs to room key
"""
return self.runInteraction(
@ -176,7 +176,7 @@ class EndToEndRoomKeyStore(SQLBaseStore):
params = [user_id, version]
for room_id, room in room_keys.items():
sessions = list(room["sessions"])
if not len(sessions):
if not sessions:
continue
params.append(room_id)
params.extend(sessions)

View file

@ -1,4 +1,4 @@
/* Copyright 2019 Matrix.org Foundation CIC
/* Copyright 2019 Matrix.org Foundation C.I.C.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View file

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
# Copyright 2016 OpenMarket Ltd
# Copyright 2017 New Vector Ltd
# Copyright 2019 Matrix.org Foundation CIC
# Copyright 2019 Matrix.org Foundation C.I.C.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.