From f07e9af194dfad02b41ef8bdb4a349e4546b445a Mon Sep 17 00:00:00 2001 From: "H. Shay" Date: Tue, 11 Oct 2022 15:42:49 -0700 Subject: add version of eventcontext without state group --- synapse/events/snapshot.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/synapse/events/snapshot.py b/synapse/events/snapshot.py index d3c8083e4a..826a84894e 100644 --- a/synapse/events/snapshot.py +++ b/synapse/events/snapshot.py @@ -114,6 +114,25 @@ class EventContext: partial_state=partial_state, ) + @staticmethod + def without_state_group( + storage: "StorageControllers", + state_group_before_event: Optional[int], + state_delta_due_to_event: Optional[StateMap[str]], + partial_state: bool, + prev_group: Optional[int] = None, + delta_ids: Optional[StateMap[str]] = None, + ) -> "EventContext": + return EventContext( + storage=storage, + state_group=None, + state_group_before_event=state_group_before_event, + state_delta_due_to_event=state_delta_due_to_event, + prev_group=prev_group, + delta_ids=delta_ids, + partial_state=partial_state, + ) + @staticmethod def for_outlier( storage: "StorageControllers", -- cgit 1.5.1