mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-26 08:13:09 -06:00
Shuffle order
This commit is contained in:
parent
872788fd16
commit
a0e9275031
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue