mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-02-24 21:43:09 -06:00
Actual username on LoginTypePassword
This commit is contained in:
parent
9c11562ea1
commit
866b70f023
|
|
@ -92,7 +92,7 @@ func (t *LoginTypePassword) Login(ctx context.Context, req interface{}) (*Login,
|
||||||
resp := jsonerror.InternalServerError()
|
resp := jsonerror.InternalServerError()
|
||||||
return nil, &resp
|
return nil, &resp
|
||||||
}
|
}
|
||||||
username = res.Localpart
|
username = "@" + res.Localpart + ":" + string(t.Config.Matrix.ServerName)
|
||||||
if username == "" {
|
if username == "" {
|
||||||
return nil, &util.JSONResponse{
|
return nil, &util.JSONResponse{
|
||||||
Code: http.StatusUnauthorized,
|
Code: http.StatusUnauthorized,
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ func Login(
|
||||||
return util.JSONResponse{
|
return util.JSONResponse{
|
||||||
Code: http.StatusOK,
|
Code: http.StatusOK,
|
||||||
JSON: loginResponse{
|
JSON: loginResponse{
|
||||||
UserID: userutil.MakeUserID(login.Username(), cfg.Matrix.ServerName),
|
UserID: login.User,
|
||||||
AccessToken: "",
|
AccessToken: "",
|
||||||
HomeServer: cfg.Matrix.ServerName,
|
HomeServer: cfg.Matrix.ServerName,
|
||||||
DeviceID: "",
|
DeviceID: "",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue