From c6fb95912bb481791c1ca370a46a4da9c05d05ad Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Wed, 8 Jul 2015 11:50:10 -0400 Subject: Changing the way we mattermost handles URLs. team.domain.com becomes domain.com/team. Renaming team.Name to team.DisplayName and team.Domain to team.Name. So: team.Name -> url safe name. team.DisplayName -> nice name for users --- api/auto_teams.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'api/auto_teams.go') diff --git a/api/auto_teams.go b/api/auto_teams.go index 2fe826774..e5c772b4c 100644 --- a/api/auto_teams.go +++ b/api/auto_teams.go @@ -39,22 +39,22 @@ func NewAutoTeamCreator(client *model.Client) *AutoTeamCreator { func (cfg *AutoTeamCreator) createRandomTeam() (*model.Team, bool) { var teamEmail string + var teamDisplayName string var teamName string - var teamDomain string if cfg.Fuzzy { teamEmail = utils.FuzzEmail() + teamDisplayName = utils.FuzzName() teamName = utils.FuzzName() - teamDomain = utils.FuzzName() } else { teamEmail = utils.RandomEmail(cfg.EmailLength, cfg.EmailCharset) - teamName = utils.RandomName(cfg.NameLength, cfg.NameCharset) - teamDomain = utils.RandomName(cfg.NameLength, cfg.NameCharset) + model.NewId() + teamDisplayName = utils.RandomName(cfg.NameLength, cfg.NameCharset) + teamName = utils.RandomName(cfg.NameLength, cfg.NameCharset) + model.NewId() } team := &model.Team{ - Name: teamName, - Domain: teamDomain, - Email: teamEmail, - Type: model.TEAM_OPEN, + DisplayName: teamDisplayName, + Name: teamName, + Email: teamEmail, + Type: model.TEAM_OPEN, } result, err := cfg.client.CreateTeam(team) -- cgit v1.2.3-1-g7c22