mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-02-22 20:43:10 -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()
|
||||
return nil, &resp
|
||||
}
|
||||
username = res.Localpart
|
||||
username = "@" + res.Localpart + ":" + string(t.Config.Matrix.ServerName)
|
||||
if username == "" {
|
||||
return nil, &util.JSONResponse{
|
||||
Code: http.StatusUnauthorized,
|
||||
|
|
|
|||
|
|
@ -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: "",
|
||||
|
|
|
|||
Loading…
Reference in a new issue