mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-26 08:13:09 -06:00
Only do this for non-state events, since state events will always result in state change at extremities
This commit is contained in:
parent
3b67ac7327
commit
c82a72b179
|
|
@ -204,6 +204,7 @@ func (u *latestEventsUpdater) latestState() error {
|
|||
// Work out if the state at the extremities has actually changed
|
||||
// or not. If they haven't then we won't bother doing all of the
|
||||
// hard work.
|
||||
if u.event.StateKey() == nil {
|
||||
stateChanged := false
|
||||
oldStateNIDs := make([]types.StateSnapshotNID, 0, len(u.oldLatest))
|
||||
newStateNIDs := make([]types.StateSnapshotNID, 0, len(u.latest))
|
||||
|
|
@ -229,6 +230,7 @@ func (u *latestEventsUpdater) latestState() error {
|
|||
u.newStateNID = u.oldStateNID
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
// Get a list of the current latest events. This may or may not
|
||||
// include the new event from the input path, depending on whether
|
||||
|
|
|
|||
Loading…
Reference in a new issue