mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-26 00:03:09 -06:00
Populate newLatest in all cases
This commit is contained in:
parent
0c86d974b2
commit
fca342101e
|
|
@ -285,12 +285,14 @@ func (u *latestEventsUpdater) calculateLatest(
|
|||
// then do nothing - it's not a candidate to be a new extremity if
|
||||
// it has been referenced.
|
||||
if _, ok := existingPrevs[newEvent.EventID()]; ok {
|
||||
u.latest = oldLatest
|
||||
return false, nil
|
||||
}
|
||||
|
||||
// If the "new" event is already a forward extremity then stop, as
|
||||
// nothing changes.
|
||||
if _, ok := existingRefs[newEvent.EventID()]; ok {
|
||||
u.latest = oldLatest
|
||||
return false, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue