mirror of
https://github.com/element-hq/synapse.git
synced 2026-08-14 07:10:48 +00:00
Rename serialize to as_json_dict
This commit is contained in:
@@ -199,7 +199,7 @@ class StrippedStateEvent:
|
||||
sender: str
|
||||
content: dict[str, Any]
|
||||
|
||||
def serialize(self) -> JsonDict:
|
||||
def as_json_dict(self) -> JsonDict:
|
||||
"""
|
||||
Serialize to the JSON representation of 'Stripped State' according to the Matrix
|
||||
spec
|
||||
|
||||
@@ -909,7 +909,7 @@ class FederationHandler:
|
||||
)
|
||||
# Replace with our sanitized `knock_room_state`
|
||||
event.unsigned["knock_room_state"] = [
|
||||
stripped_state_event.serialize()
|
||||
stripped_state_event.as_json_dict()
|
||||
for stripped_state_event in stripped_room_state
|
||||
]
|
||||
except Exception as exc:
|
||||
@@ -946,7 +946,7 @@ class FederationHandler:
|
||||
if stripped_room_state_for_client is not None:
|
||||
# Replace with our sanitized `knock_room_state`
|
||||
event.unsigned["knock_room_state"] = [
|
||||
stripped_state_event.serialize()
|
||||
stripped_state_event.as_json_dict()
|
||||
for stripped_state_event in stripped_room_state_for_client
|
||||
]
|
||||
|
||||
@@ -1320,7 +1320,7 @@ class FederationHandler:
|
||||
)
|
||||
# Replace with our sanitized `invite_room_state`
|
||||
event.unsigned["invite_room_state"] = [
|
||||
stripped_state_event.serialize()
|
||||
stripped_state_event.as_json_dict()
|
||||
for stripped_state_event in stripped_room_state
|
||||
]
|
||||
except Exception as exc:
|
||||
@@ -1355,7 +1355,7 @@ class FederationHandler:
|
||||
if stripped_room_state_for_client is not None:
|
||||
# Replace with our sanitized `invite_room_state`
|
||||
event.unsigned["invite_room_state"] = [
|
||||
stripped_state_event.serialize()
|
||||
stripped_state_event.as_json_dict()
|
||||
for stripped_state_event in stripped_room_state_for_client
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user