diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-07-10 14:30:08 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-10 14:30:08 -0400 |
commit | 66a4af8d9627719a875c405c8c0f49b0056811b2 (patch) | |
tree | 8b489d82abe00793da78d40715dbb91731224044 /synapse/federation/federation_server.py | |
parent | Add types to the server code and remove unused parameter (#7813) (diff) | |
download | synapse-66a4af8d9627719a875c405c8c0f49b0056811b2.tar.xz |
Do not use canonicaljson to magically handle decoding bytes from JSON. (#7802)
Diffstat (limited to 'synapse/federation/federation_server.py')
-rw-r--r-- | synapse/federation/federation_server.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/federation/federation_server.py b/synapse/federation/federation_server.py index 86051decd4..2aab9c5f55 100644 --- a/synapse/federation/federation_server.py +++ b/synapse/federation/federation_server.py @@ -14,10 +14,10 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +import json import logging from typing import Any, Callable, Dict, List, Match, Optional, Tuple, Union -from canonicaljson import json from prometheus_client import Counter, Histogram from twisted.internet import defer @@ -526,9 +526,9 @@ class FederationServer(FederationBase): json_result = {} # type: Dict[str, Dict[str, dict]] for user_id, device_keys in results.items(): for device_id, keys in device_keys.items(): - for key_id, json_bytes in keys.items(): + for key_id, json_str in keys.items(): json_result.setdefault(user_id, {})[device_id] = { - key_id: json.loads(json_bytes) + key_id: json.loads(json_str) } logger.info( |