diff options
author | Shay <hillerys@element.io> | 2023-08-07 10:37:08 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-07 10:37:08 -0700 |
commit | 81a6f8c9ae0241afa9973da2f53efc2467e61c6b (patch) | |
tree | 560c25736c50325bdc356bfffb5f095876c3922c /synapse | |
parent | Add notes describing Synapse's streams (#16015) (diff) | |
download | synapse-81a6f8c9ae0241afa9973da2f53efc2467e61c6b.tar.xz |
Drop backwards compat hack for event serialization (#16069)
Diffstat (limited to '')
-rw-r--r-- | synapse/events/snapshot.py | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/synapse/events/snapshot.py b/synapse/events/snapshot.py index a43498ed4d..a9e3d4e556 100644 --- a/synapse/events/snapshot.py +++ b/synapse/events/snapshot.py @@ -186,9 +186,6 @@ class EventContext(UnpersistedEventContextBase): ), "app_service_id": self.app_service.id if self.app_service else None, "partial_state": self.partial_state, - # add dummy delta_ids and prev_group for backwards compatibility - "delta_ids": None, - "prev_group": None, } @staticmethod @@ -203,13 +200,6 @@ class EventContext(UnpersistedEventContextBase): Returns: The event context. """ - # workaround for backwards/forwards compatibility: if the input doesn't have a value - # for "state_group_deltas" just assign an empty dict - state_group_deltas = input.get("state_group_deltas", None) - if state_group_deltas: - state_group_deltas = _decode_state_group_delta(state_group_deltas) - else: - state_group_deltas = {} context = EventContext( # We use the state_group and prev_state_id stuff to pull the @@ -217,7 +207,7 @@ class EventContext(UnpersistedEventContextBase): storage=storage, state_group=input["state_group"], state_group_before_event=input["state_group_before_event"], - state_group_deltas=state_group_deltas, + state_group_deltas=_decode_state_group_delta(input["state_group_deltas"]), state_delta_due_to_event=_decode_state_dict( input["state_delta_due_to_event"] ), |