diff options
author | Richard van der Hoff <richard@matrix.org> | 2017-03-17 14:30:16 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2017-03-17 15:06:08 +0000 |
commit | 0c01f829ae873bbc6451d5933ee77351ba20b93f (patch) | |
tree | 9beddc25115cb9931933727b1ea6d7205999ce72 /synapse/storage/events.py | |
parent | Refactoring and cleanups (diff) | |
download | synapse-0c01f829ae873bbc6451d5933ee77351ba20b93f.tar.xz |
Avoid resetting state on rejected events
When we get a rejected event, give it the same state_group as its prev_event, rather than no state_group at all. This should fix https://github.com/matrix-org/synapse/issues/1935.
Diffstat (limited to 'synapse/storage/events.py')
-rw-r--r-- | synapse/storage/events.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py index 42e433da85..4d3cfc336f 100644 --- a/synapse/storage/events.py +++ b/synapse/storage/events.py @@ -645,6 +645,10 @@ class EventsStore(SQLBaseStore): events_and_contexts=events_and_contexts, ) + # Insert into the state_groups, state_groups_state, and + # event_to_state_groups tables. + self._store_mult_state_groups_txn(txn, events_and_contexts) + # _store_rejected_events_txn filters out any events which were # rejected, and returns the filtered list. events_and_contexts = self._store_rejected_events_txn( @@ -1075,10 +1079,6 @@ class EventsStore(SQLBaseStore): ], ) - # Insert into the state_groups, state_groups_state, and - # event_to_state_groups tables. - self._store_mult_state_groups_txn(txn, events_and_contexts) - # Update the event_forward_extremities, event_backward_extremities and # event_edges tables. self._handle_mult_prev_events( |