mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-08 14:43:09 -06:00
Be more specific
This commit is contained in:
parent
ba8e1607e2
commit
9b2dc10254
|
|
@ -501,11 +501,15 @@ func (d *Database) events(
|
||||||
if !ok {
|
if !ok {
|
||||||
panic("should have position")
|
panic("should have position")
|
||||||
}
|
}
|
||||||
|
delete(positions, result.EventNID)
|
||||||
results[pos] = result
|
results[pos] = result
|
||||||
if result.Event != nil {
|
if result.Event != nil {
|
||||||
d.Cache.StoreRoomServerEvent(result.EventNID, result.Event)
|
d.Cache.StoreRoomServerEvent(result.EventNID, result.Event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if len(positions) > 0 {
|
||||||
|
panic("unsatisfied events")
|
||||||
|
}
|
||||||
if !redactionsArePermanent {
|
if !redactionsArePermanent {
|
||||||
d.applyRedactions(results)
|
d.applyRedactions(results)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue