diff options
author | H. Shay <hillerys@element.io> | 2022-10-11 15:42:49 -0700 |
---|---|---|
committer | H. Shay <hillerys@element.io> | 2022-10-11 15:42:49 -0700 |
commit | f07e9af194dfad02b41ef8bdb4a349e4546b445a (patch) | |
tree | 2f79c85877f535e32aa98be7b67dfaa6e1b336d2 | |
parent | Bump types-psycopg2 from 2.9.9 to 2.9.21.1 (#14114) (diff) | |
download | synapse-f07e9af194dfad02b41ef8bdb4a349e4546b445a.tar.xz |
add version of eventcontext without state group
-rw-r--r-- | synapse/events/snapshot.py | 19 |
1 files changed, 19 insertions, 0 deletions
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 @@ -115,6 +115,25 @@ class EventContext: ) @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", ) -> "EventContext": |