mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-14 18:33:09 -06:00
Fix lint warnings
This commit is contained in:
parent
1fb3950e6b
commit
2758f668f6
|
|
@ -103,7 +103,7 @@ func InvalidUsername(msg string) *MatrixError {
|
||||||
return &MatrixError{"M_INVALID_USERNAME", msg}
|
return &MatrixError{"M_INVALID_USERNAME", msg}
|
||||||
}
|
}
|
||||||
|
|
||||||
// InvalidUsername is an error returned when the client tries to register an
|
// UserInUse is an error returned when the client tries to register an
|
||||||
// username that already exists
|
// username that already exists
|
||||||
func UserInUse(msg string) *MatrixError {
|
func UserInUse(msg string) *MatrixError {
|
||||||
return &MatrixError{"M_USER_IN_USE", msg}
|
return &MatrixError{"M_USER_IN_USE", msg}
|
||||||
|
|
|
||||||
|
|
@ -458,7 +458,7 @@ func completeRegistration(
|
||||||
}
|
}
|
||||||
|
|
||||||
avail, err := accountDB.CheckAccountAvailability(ctx, username)
|
avail, err := accountDB.CheckAccountAvailability(ctx, username)
|
||||||
if err == nil && avail == false {
|
if err == nil && !avail {
|
||||||
return util.JSONResponse{
|
return util.JSONResponse{
|
||||||
Code: 400,
|
Code: 400,
|
||||||
JSON: jsonerror.UserInUse("Desired user ID is already taken."),
|
JSON: jsonerror.UserInUse("Desired user ID is already taken."),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue