mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-11-16 04:29:06 -05:00
Don't unfreeze when using FreezeEvent.get_dict, as we are using a JSONEncoder that understands FrozenDict
This commit is contained in:
parent
4ebbaf0d43
commit
ddb816cf60
6 changed files with 36 additions and 13 deletions
|
|
@ -298,12 +298,16 @@ class DataStore(RoomMemberStore, RoomStore,
|
|||
or_replace=True,
|
||||
)
|
||||
|
||||
content = encode_canonical_json(
|
||||
event.content
|
||||
).decode("UTF-8")
|
||||
|
||||
vals = {
|
||||
"topological_ordering": event.depth,
|
||||
"event_id": event.event_id,
|
||||
"type": event.type,
|
||||
"room_id": event.room_id,
|
||||
"content": json.dumps(event.get_dict()["content"]),
|
||||
"content": content,
|
||||
"processed": True,
|
||||
"outlier": outlier,
|
||||
"depth": event.depth,
|
||||
|
|
@ -323,7 +327,10 @@ class DataStore(RoomMemberStore, RoomStore,
|
|||
"prev_events",
|
||||
]
|
||||
}
|
||||
vals["unrecognized_keys"] = json.dumps(unrec)
|
||||
|
||||
vals["unrecognized_keys"] = encode_canonical_json(
|
||||
unrec
|
||||
).decode("UTF-8")
|
||||
|
||||
try:
|
||||
self._simple_insert_txn(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue