diff --git a/clientapi/auth/password.go b/clientapi/auth/password.go index e636f731e..05d044a9b 100644 --- a/clientapi/auth/password.go +++ b/clientapi/auth/password.go @@ -92,7 +92,7 @@ func (t *LoginTypePassword) Login(ctx context.Context, req interface{}) (*Login, resp := jsonerror.InternalServerError() return nil, &resp } - username = res.Localpart + username = "@" + res.Localpart + ":" + string(t.Config.Matrix.ServerName) if username == "" { return nil, &util.JSONResponse{ Code: http.StatusUnauthorized, diff --git a/clientapi/routing/login.go b/clientapi/routing/login.go index d380a94a6..7d0a63e55 100644 --- a/clientapi/routing/login.go +++ b/clientapi/routing/login.go @@ -73,7 +73,7 @@ func Login( return util.JSONResponse{ Code: http.StatusOK, JSON: loginResponse{ - UserID: userutil.MakeUserID(login.Username(), cfg.Matrix.ServerName), + UserID: login.User, AccessToken: "", HomeServer: cfg.Matrix.ServerName, DeviceID: "",