Merge branch 'main' of github.com:matrix-org/dendrite into s7evink/memberships
This commit is contained in:
commit
3085928906
|
@ -282,17 +282,17 @@ func (d *Database) addState(
|
||||||
var found bool
|
var found bool
|
||||||
for i := len(state) - 1; i >= 0; i-- {
|
for i := len(state) - 1; i >= 0; i-- {
|
||||||
found = false
|
found = false
|
||||||
|
blocksLoop:
|
||||||
for _, events := range blocks {
|
for _, events := range blocks {
|
||||||
for _, event := range events {
|
for _, event := range events {
|
||||||
if state[i].EventNID == event {
|
if state[i].EventNID == event {
|
||||||
found = true
|
found = true
|
||||||
break
|
break blocksLoop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if found {
|
if found {
|
||||||
state = append(state[:i], state[i+1:]...)
|
state = append(state[:i], state[i+1:]...)
|
||||||
i--
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue