From a0e92750311e8ed0b058b7e7b1ac99bcbb09768b Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Wed, 30 Jun 2021 11:29:23 +0100 Subject: [PATCH] Shuffle order --- federationapi/routing/send.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/federationapi/routing/send.go b/federationapi/routing/send.go index 73ae9a767..436f07e3b 100644 --- a/federationapi/routing/send.go +++ b/federationapi/routing/send.go @@ -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 }