mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-12 09:23: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}
|
||||
}
|
||||
|
||||
// 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}
|
||||
|
|
|
|||
|
|
@ -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."),
|
||||
|
|
|
|||
Loading…
Reference in a new issue