From 0227613214610fb056ca0203bc17b791c13752dd Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Fri, 18 Nov 2022 12:25:49 +0000 Subject: [PATCH] Tweak fallback --- clientapi/routing/register.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clientapi/routing/register.go b/clientapi/routing/register.go index e0045cb64..ae6729492 100644 --- a/clientapi/routing/register.go +++ b/clientapi/routing/register.go @@ -551,6 +551,7 @@ func Register( } var r registerRequest + r.ServerName = cfg.Matrix.ServerName if v := cfg.Matrix.VirtualHostForHTTPHost(gomatrixserverlib.ServerName(req.Host)); v != nil { r.ServerName = v.ServerName } @@ -578,7 +579,6 @@ func Register( if resErr := httputil.UnmarshalJSON(reqBody, &r); resErr != nil { return *resErr } - r.ServerName = cfg.Matrix.ServerName if l, d, err := cfg.Matrix.SplitLocalID('@', r.Username); err == nil { r.Username, r.ServerName = l, d }