summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-01-05 17:38:05 -0500
committerChristopher Speller <crspeller@gmail.com>2016-01-05 17:38:05 -0500
commit482158d2bbc59be80e916bd2197f0fc609d9bc73 (patch)
tree705b1bd32e97805b972ed25e3d393a47d5ce3d20 /api
parent330cbc8f190fc7cbe99186f048bd4656913820be (diff)
parent6a6558e0eb6cf07f6c6b291418aec7d3022787c7 (diff)
downloadchat-482158d2bbc59be80e916bd2197f0fc609d9bc73.tar.gz
chat-482158d2bbc59be80e916bd2197f0fc609d9bc73.tar.bz2
chat-482158d2bbc59be80e916bd2197f0fc609d9bc73.zip
Merge pull request #1807 from mattermost/PLT-1572
PLT-1572 Adding more info to the error message
Diffstat (limited to 'api')
-rw-r--r--api/team.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/api/team.go b/api/team.go
index dd9bd0bac..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"
@@ -480,7 +481,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 != 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