mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-02 14:12:47 +00:00
Try to spot state deletions when they happen (#2489)
This commit is contained in:
parent
ff53398635
commit
6940c7c7dd
4 changed files with 12 additions and 16 deletions
|
@ -535,8 +535,6 @@ func (r *Inputer) calculateAndSetState(
|
|||
roomState := state.NewStateResolution(updater, roomInfo)
|
||||
|
||||
if input.HasState {
|
||||
stateAtEvent.Overwrite = true
|
||||
|
||||
// We've been told what the state at the event is so we don't need to calculate it.
|
||||
// Check that those state events are in the database and store the state.
|
||||
var entries []types.StateEntry
|
||||
|
@ -549,8 +547,6 @@ func (r *Inputer) calculateAndSetState(
|
|||
return fmt.Errorf("updater.AddState: %w", err)
|
||||
}
|
||||
} else {
|
||||
stateAtEvent.Overwrite = false
|
||||
|
||||
// We haven't been told what the state at the event is so we need to calculate it from the prev_events
|
||||
if stateAtEvent.BeforeStateSnapshotNID, err = roomState.CalculateAndStoreStateBeforeEvent(ctx, event, isRejected); err != nil {
|
||||
return fmt.Errorf("roomState.CalculateAndStoreStateBeforeEvent: %w", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue