Shuffle order

This commit is contained in:
Neil Alexander 2021-06-30 11:29:23 +01:00
parent 872788fd16
commit a0e9275031
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -476,11 +476,6 @@ func (t *txnReq) getServers(ctx context.Context, roomID string, event *gomatrixs
// The server that sent us the event should be sufficient to tell us about missing
// prev and auth events.
servers := []gomatrixserverlib.ServerName{t.Origin}
// If a specific room-to-server provider exists then use that. This will primarily
// be used for the P2P demos.
if t.servers != nil {
return append(servers, t.servers.GetServersForRoom(ctx, roomID, event)...)
}
// If the event origin is different to the transaction origin then we can use
// this as a last resort. The origin server that created the event would have
// had to know the auth and prev events.
@ -489,6 +484,11 @@ func (t *txnReq) getServers(ctx context.Context, roomID string, event *gomatrixs
servers = append(servers, origin)
}
}
// If a specific room-to-server provider exists then use that. This will primarily
// be used for the P2P demos.
if t.servers != nil {
servers = append(servers, t.servers.GetServersForRoom(ctx, roomID, event)...)
}
return servers
}