From 9ddf26f6fb1a947c6e473c925423775f948453e4 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Tue, 5 Jan 2016 09:02:07 -0600 Subject: Fixing error message --- api/team.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'api') diff --git a/api/team.go b/api/team.go index dd9bd0bac..0c4ada0c1 100644 --- a/api/team.go +++ b/api/team.go @@ -480,7 +480,7 @@ func inviteMembers(c *Context, w http.ResponseWriter, r *http.Request) { var invNum int64 = 0 for i, invite := range invites.Invites { - if result := <-Srv.Store.User().GetByEmail(c.Session.TeamId, invite["email"]); result.Err == nil || result.Err.Message != "We couldn't find the existing account" { + if result := <-Srv.Store.User().GetByEmail(c.Session.TeamId, invite["email"]); result.Err == nil || result.Err.Message != "We couldn't find an existing account matching your email address for this team. This team may require an invite from the team owner to join." { invNum = int64(i) c.Err = model.NewAppError("invite_members", "This person is already on your team", strconv.FormatInt(invNum, 10)) return -- cgit v1.2.3-1-g7c22 From 4e8c59279c235fef021f01ca67a05869ab54d1aa Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Tue, 5 Jan 2016 14:53:41 -0600 Subject: Moving to constnt --- api/team.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'api') diff --git a/api/team.go b/api/team.go index 0c4ada0c1..7484aa86e 100644 --- a/api/team.go +++ b/api/team.go @@ -480,7 +480,7 @@ func inviteMembers(c *Context, w http.ResponseWriter, r *http.Request) { var invNum int64 = 0 for i, invite := range invites.Invites { - if result := <-Srv.Store.User().GetByEmail(c.Session.TeamId, invite["email"]); result.Err == nil || result.Err.Message != "We couldn't find an existing account matching your email address for this team. This team may require an invite from the team owner to join." { + if result := <-Srv.Store.User().GetByEmail(c.Session.TeamId, invite["email"]); result.Err == nil || result.Err.Message != store.MISSING_ACCOUNT_ERROR { invNum = int64(i) c.Err = model.NewAppError("invite_members", "This person is already on your team", strconv.FormatInt(invNum, 10)) return -- cgit v1.2.3-1-g7c22 From 6a6558e0eb6cf07f6c6b291418aec7d3022787c7 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Tue, 5 Jan 2016 14:59:02 -0600 Subject: Fixing Import --- api/team.go | 1 + 1 file changed, 1 insertion(+) (limited to 'api') diff --git a/api/team.go b/api/team.go index 7484aa86e..fbcb301a9 100644 --- a/api/team.go +++ b/api/team.go @@ -9,6 +9,7 @@ import ( "fmt" "github.com/gorilla/mux" "github.com/mattermost/platform/model" + "github.com/mattermost/platform/store" "github.com/mattermost/platform/utils" "net/http" "net/url" -- cgit v1.2.3-1-g7c22