mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-12 09:23:09 -06:00
Improve iteration
This commit is contained in:
parent
f8cb14678c
commit
e73e5413f1
|
|
@ -302,9 +302,7 @@ func buildMembershipEvents(
|
||||||
|
|
||||||
authEvents := gomatrixserverlib.NewAuthEvents(nil)
|
authEvents := gomatrixserverlib.NewAuthEvents(nil)
|
||||||
|
|
||||||
// Iterating the old way because range seems to mess things up. Might be
|
for i := range queryRes.StateEvents {
|
||||||
// worth investigating.
|
|
||||||
for i := 0; i < len(queryRes.StateEvents); i++ {
|
|
||||||
authEvents.AddEvent(&queryRes.StateEvents[i])
|
authEvents.AddEvent(&queryRes.StateEvents[i])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue