mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-13 03:12:19 -04:00
Reduce unnecessary whitespace in JSON. (#7372)
This commit is contained in:
parent
2ffd6783c7
commit
4dd27e6d11
15 changed files with 56 additions and 53 deletions
|
@ -17,11 +17,10 @@
|
|||
import logging
|
||||
from typing import List
|
||||
|
||||
from canonicaljson import json
|
||||
|
||||
from synapse.metrics.background_process_metrics import run_as_background_process
|
||||
from synapse.storage._base import LoggingTransaction, SQLBaseStore, db_to_json
|
||||
from synapse.storage.database import DatabasePool
|
||||
from synapse.util import json_encoder
|
||||
from synapse.util.caches.descriptors import cachedInlineCallbacks
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
@ -50,7 +49,7 @@ def _serialize_action(actions, is_highlight):
|
|||
else:
|
||||
if actions == DEFAULT_NOTIF_ACTION:
|
||||
return ""
|
||||
return json.dumps(actions)
|
||||
return json_encoder.encode(actions)
|
||||
|
||||
|
||||
def _deserialize_action(actions, is_highlight):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue