mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-29 17:53:09 -06:00
Use HasState more opportunistically
This commit is contained in:
parent
8afdb167f6
commit
6abd2df1f1
|
|
@ -299,7 +299,7 @@ func (r *Inputer) processRoomEvent(
|
|||
return rollbackTransaction, fmt.Errorf("updater.RoomInfo missing for room %s", event.RoomID())
|
||||
}
|
||||
|
||||
if !missingPrev && stateAtEvent.BeforeStateSnapshotNID == 0 {
|
||||
if input.HasState || (!missingPrev && stateAtEvent.BeforeStateSnapshotNID == 0) {
|
||||
// We haven't calculated a state for this event yet.
|
||||
// Lets calculate one.
|
||||
err = r.calculateAndSetState(ctx, updater, input, roomInfo, &stateAtEvent, event, isRejected)
|
||||
|
|
|
|||
Loading…
Reference in a new issue