Merge branch 'master' into mm-1355

Этот коммит содержится в:
=Corey Hulen
2015-07-30 01:06:50 -08:00
родитель b4877c5d36 deb4fac1f6
Коммит d93bf60248
41 изменённых файлов: 1111 добавлений и 366 удалений

Просмотреть файл

@@ -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)
}
}

Просмотреть файл

@@ -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)