mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-05-06 22:05:03 -04:00
Use the JSON encoder without whitespace in more places. (#8124)
This commit is contained in:
parent
5eac0b7e76
commit
dbc630a628
9 changed files with 21 additions and 27 deletions
|
@ -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",
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue