Fix lint warnings

This commit is contained in:
Crom (Thibaut CHARLES) 2017-12-10 18:12:18 +01:00
parent 1fb3950e6b
commit 2758f668f6
No known key found for this signature in database
GPG key ID: 45A3D5F880B9E6D0
2 changed files with 2 additions and 2 deletions

View file

@ -103,7 +103,7 @@ func InvalidUsername(msg string) *MatrixError {
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
func UserInUse(msg string) *MatrixError {
return &MatrixError{"M_USER_IN_USE", msg}

View file

@ -458,7 +458,7 @@ func completeRegistration(
}
avail, err := accountDB.CheckAccountAvailability(ctx, username)
if err == nil && avail == false {
if err == nil && !avail {
return util.JSONResponse{
Code: 400,
JSON: jsonerror.UserInUse("Desired user ID is already taken."),