mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-07 06:53:09 -06:00
More comments
This commit is contained in:
parent
2a33b17ee1
commit
1f3d2c6acd
|
|
@ -140,7 +140,8 @@ func calculateAndStoreStateMany(db RoomEventDatabase, roomNID types.RoomNID, pre
|
||||||
}
|
}
|
||||||
|
|
||||||
// Collect all the entries with the same type and key together.
|
// Collect all the entries with the same type and key together.
|
||||||
// We don't care about the order here.
|
// We don't care about the order here because the conflict resolution
|
||||||
|
// algorithm doesn't depend on the order of the prev events.
|
||||||
sort.Sort(stateEntrySorter(combined))
|
sort.Sort(stateEntrySorter(combined))
|
||||||
// Remove duplicate entires.
|
// Remove duplicate entires.
|
||||||
combined = combined[:unique(stateEntrySorter(combined))]
|
combined = combined[:unique(stateEntrySorter(combined))]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue