mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:36:06 -04:00
Merge pull request #8678 from matrix-org/rav/fix_frozen_events
Fix serialisation errors when using third-party event rules.
This commit is contained in:
commit
c97da1e45d
7 changed files with 32 additions and 40 deletions
|
@ -35,8 +35,6 @@ from twisted.web.server import NOT_DONE_YET, Request
|
|||
from twisted.web.static import File, NoRangeStaticProducer
|
||||
from twisted.web.util import redirectTo
|
||||
|
||||
import synapse.events
|
||||
import synapse.metrics
|
||||
from synapse.api.errors import (
|
||||
CodeMessageException,
|
||||
Codes,
|
||||
|
@ -620,7 +618,7 @@ def respond_with_json(
|
|||
if pretty_print:
|
||||
encoder = iterencode_pretty_printed_json
|
||||
else:
|
||||
if canonical_json or synapse.events.USE_FROZEN_DICTS:
|
||||
if canonical_json:
|
||||
encoder = iterencode_canonical_json
|
||||
else:
|
||||
encoder = _encode_json_bytes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue