From 2758f668f660d1170588e26eb00c5bacafe4097a Mon Sep 17 00:00:00 2001 From: "Crom (Thibaut CHARLES)" Date: Sun, 10 Dec 2017 18:12:18 +0100 Subject: [PATCH] Fix lint warnings --- .../matrix-org/dendrite/clientapi/jsonerror/jsonerror.go | 2 +- .../matrix-org/dendrite/clientapi/routing/register.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/github.com/matrix-org/dendrite/clientapi/jsonerror/jsonerror.go b/src/github.com/matrix-org/dendrite/clientapi/jsonerror/jsonerror.go index 747924188..1bab645fa 100644 --- a/src/github.com/matrix-org/dendrite/clientapi/jsonerror/jsonerror.go +++ b/src/github.com/matrix-org/dendrite/clientapi/jsonerror/jsonerror.go @@ -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} diff --git a/src/github.com/matrix-org/dendrite/clientapi/routing/register.go b/src/github.com/matrix-org/dendrite/clientapi/routing/register.go index 73282d47b..6bcff84a3 100644 --- a/src/github.com/matrix-org/dendrite/clientapi/routing/register.go +++ b/src/github.com/matrix-org/dendrite/clientapi/routing/register.go @@ -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."),