mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-03 22:52:47 +00:00
Tweaks to latest events updater (#1045)
* Comment out updaters a bit, add overwrite flag to latest events * Make sure we don't send fast-forwarded state changes over federation, start with empty set when overwriting * Remove redundant check for overwrite
This commit is contained in:
parent
5c221f0655
commit
9ef30bb13b
4 changed files with 101 additions and 23 deletions
|
@ -16,7 +16,6 @@ package internal
|
|||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/matrix-org/dendrite/roomserver/api"
|
||||
|
@ -108,10 +107,10 @@ func updateMembership(
|
|||
}
|
||||
|
||||
if add == nil {
|
||||
// This shouldn't happen. Returning an error here is better than panicking
|
||||
// in the membership updater functions later on.
|
||||
// TODO: Why does this happen to begin with?
|
||||
return updates, errors.New("add should not be nil")
|
||||
// This can happen when we have rejoined a room and suddenly we have a
|
||||
// divergence between the former state and the new one. We don't want to
|
||||
// act on removals and apparently there are no adds, so stop here.
|
||||
return updates, nil
|
||||
}
|
||||
|
||||
mu, err := updater.MembershipUpdater(targetUserNID)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue