diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-08-20 10:32:33 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-20 10:32:33 -0400 |
commit | dbc630a628e4fc6eb5eff09ce5edba062c0e9955 (patch) | |
tree | 2763c1411e608531526b269f9a2746121e117774 /synapse/storage/databases/main/room.py | |
parent | Add more types to synapse.storage.database. (#8127) (diff) | |
download | synapse-dbc630a628e4fc6eb5eff09ce5edba062c0e9955.tar.xz |
Use the JSON encoder without whitespace in more places. (#8124)
Diffstat (limited to 'synapse/storage/databases/main/room.py')
-rw-r--r-- | synapse/storage/databases/main/room.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/synapse/storage/databases/main/room.py b/synapse/storage/databases/main/room.py index aef08c7e12..7d3ac47261 100644 --- a/synapse/storage/databases/main/room.py +++ b/synapse/storage/databases/main/room.py @@ -21,8 +21,6 @@ from abc import abstractmethod from enum import Enum from typing import Any, Dict, List, Optional, Tuple -from canonicaljson import json - from synapse.api.constants import EventTypes from synapse.api.errors import StoreError from synapse.api.room_versions import RoomVersion, RoomVersions @@ -30,6 +28,7 @@ from synapse.storage._base import SQLBaseStore, db_to_json from synapse.storage.database import DatabasePool, LoggingTransaction from synapse.storage.databases.main.search import SearchStore from synapse.types import ThirdPartyInstanceID +from synapse.util import json_encoder from synapse.util.caches.descriptors import cached logger = logging.getLogger(__name__) @@ -1310,7 +1309,7 @@ class RoomStore(RoomBackgroundUpdateStore, RoomWorkerStore, SearchStore): "event_id": event_id, "user_id": user_id, "reason": reason, - "content": json.dumps(content), + "content": json_encoder.encode(content), }, desc="add_event_report", ) |