Don't add to server_names if some are already specified

This commit is contained in:
Neil Alexander 2021-11-12 13:57:50 +00:00
parent e874853ed0
commit 72b65640a4
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -177,8 +177,8 @@ func (r *Joiner) performJoinRoomByID(
// If the server name in the room ID isn't ours then it's a // If the server name in the room ID isn't ours then it's a
// possible candidate for finding the room via federation. Add // possible candidate for finding the room via federation. Add
// it to the list of servers to try. // it to the list of servers to try if we have no better ideas.
if domain != r.Cfg.Matrix.ServerName { if len(req.ServerNames) == 0 && domain != r.Cfg.Matrix.ServerName {
req.ServerNames = append(req.ServerNames, domain) req.ServerNames = append(req.ServerNames, domain)
} }