mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-16 11:23:11 -06:00
Undo changes
This commit is contained in:
parent
fee7b51d6e
commit
eab5155658
|
|
@ -47,9 +47,6 @@ type passwordRequest struct {
|
|||
// Thus a pointer is needed to differentiate between the two
|
||||
InitialDisplayName *string `json:"initial_device_display_name"`
|
||||
DeviceID *string `json:"device_id"`
|
||||
Identifier struct {
|
||||
User string `json:"user"`
|
||||
} `json:"identifier"`
|
||||
}
|
||||
|
||||
type loginResponse struct {
|
||||
|
|
@ -82,15 +79,13 @@ func Login(
|
|||
if resErr != nil {
|
||||
return *resErr
|
||||
}
|
||||
if r.User == "" && r.Identifier.User == "" {
|
||||
if r.User == "" {
|
||||
return util.JSONResponse{
|
||||
Code: http.StatusBadRequest,
|
||||
JSON: jsonerror.BadJSON("'user' must be supplied."),
|
||||
}
|
||||
}
|
||||
if r.User == "" {
|
||||
r.User = r.Identifier.User
|
||||
}
|
||||
|
||||
util.GetLogger(req.Context()).WithField("user", r.User).Info("Processing login request")
|
||||
|
||||
localpart, err := userutil.ParseUsernameParam(r.User, &cfg.Matrix.ServerName)
|
||||
|
|
|
|||
Loading…
Reference in a new issue