mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-28 17:23:09 -06:00
Topologically sort outliers in SendEventWithState
This commit is contained in:
parent
43ac66e0b4
commit
f0c60f886a
|
|
@ -54,6 +54,13 @@ func SendEventWithState(
|
|||
return err
|
||||
}
|
||||
|
||||
// The roomserver processes events strictly in the order they are given,
|
||||
// so we need to make sure that events don't refer to auth events that
|
||||
// the roomserver doesn't know about yet.
|
||||
outliers = gomatrixserverlib.ReverseTopologicalOrdering(
|
||||
outliers, gomatrixserverlib.TopologicalOrderByAuthEvents,
|
||||
)
|
||||
|
||||
var ires []InputRoomEvent
|
||||
for _, outlier := range outliers {
|
||||
if haveEventIDs[outlier.EventID()] {
|
||||
|
|
|
|||
Loading…
Reference in a new issue