summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-07-30 01:06:50 -0800
committer=Corey Hulen <corey@hulen.com>2015-07-30 01:06:50 -0800
commitd93bf60248f066542d0851a7b6847f925975d77f (patch)
treebb2c8a931855c3a9da6cdd7d906a8f1b99b7fd46 /api
parentb4877c5d36569dae486a1e53f39c35d346e3d3d2 (diff)
parentdeb4fac1f64fde5d5f435129a79eada44cb6994c (diff)
downloadchat-d93bf60248f066542d0851a7b6847f925975d77f.tar.gz
chat-d93bf60248f066542d0851a7b6847f925975d77f.tar.bz2
chat-d93bf60248f066542d0851a7b6847f925975d77f.zip
Merge branch 'master' into mm-1355
Diffstat (limited to 'api')
-rw-r--r--api/channel_test.go4
-rw-r--r--api/team.go7
2 files changed, 2 insertions, 9 deletions
diff --git a/api/channel_test.go b/api/channel_test.go
index ae7781302..a8d53c4b5 100644
--- a/api/channel_test.go
+++ b/api/channel_test.go
@@ -56,7 +56,7 @@ func TestCreateChannel(t *testing.T) {
rchannel.Data.(*model.Channel).Id = ""
if _, err := Client.CreateChannel(rchannel.Data.(*model.Channel)); err != nil {
- if err.Message != "A channel with that name already exists" {
+ if err.Message != "A channel with that handle already exists" {
t.Fatal(err)
}
}
@@ -67,7 +67,7 @@ func TestCreateChannel(t *testing.T) {
Client.DeleteChannel(savedId)
if _, err := Client.CreateChannel(rchannel.Data.(*model.Channel)); err != nil {
- if err.Message != "A channel with that name was previously created" {
+ if err.Message != "A channel with that handle was previously created" {
t.Fatal(err)
}
}
diff --git a/api/team.go b/api/team.go
index 1145e6e81..c9fe42ecc 100644
--- a/api/team.go
+++ b/api/team.go
@@ -35,25 +35,18 @@ func signupTeam(c *Context, w http.ResponseWriter, r *http.Request) {
m := model.MapFromJson(r.Body)
email := strings.ToLower(strings.TrimSpace(m["email"]))
- displayName := strings.TrimSpace(m["display_name"])
if len(email) == 0 {
c.SetInvalidParam("signupTeam", "email")
return
}
- if len(displayName) == 0 {
- c.SetInvalidParam("signupTeam", "display_name")
- return
- }
-
subjectPage := NewServerTemplatePage("signup_team_subject", c.GetSiteURL())
bodyPage := NewServerTemplatePage("signup_team_body", c.GetSiteURL())
bodyPage.Props["TourUrl"] = utils.Cfg.TeamSettings.TourLink
props := make(map[string]string)
props["email"] = email
- props["display_name"] = displayName
props["time"] = fmt.Sprintf("%v", model.GetMillis())
data := model.MapToJson(props)