From 72b65640a47b341656970a34348f781ee5cfbed6 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Fri, 12 Nov 2021 13:57:50 +0000 Subject: [PATCH] Don't add to server_names if some are already specified --- roomserver/internal/perform/perform_join.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roomserver/internal/perform/perform_join.go b/roomserver/internal/perform/perform_join.go index b25b273b..77ec83f3 100644 --- a/roomserver/internal/perform/perform_join.go +++ b/roomserver/internal/perform/perform_join.go @@ -177,8 +177,8 @@ func (r *Joiner) performJoinRoomByID( // If the server name in the room ID isn't ours then it's a // possible candidate for finding the room via federation. Add - // it to the list of servers to try. - if domain != r.Cfg.Matrix.ServerName { + // it to the list of servers to try if we have no better ideas. + if len(req.ServerNames) == 0 && domain != r.Cfg.Matrix.ServerName { req.ServerNames = append(req.ServerNames, domain) }