Skip to content

Commit

Permalink
Merge 5f40be7 into 187bb31
Browse files Browse the repository at this point in the history
  • Loading branch information
grundleborg committed Mar 2, 2017
2 parents 187bb31 + 5f40be7 commit a5ae712
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/slackimport.go
Expand Up @@ -155,6 +155,11 @@ func SlackAddUsers(teamId string, slackusers []SlackUser, log *bytes.Buffer) map
}

email := sUser.Profile["email"]
if email == "" {
email = sUser.Username + "@example.com"
log.WriteString(utils.T("api.slackimport.slack_add_users.missing_email_address", map[string]interface{}{"Email": email, "Username": sUser.Username}))
l4g.Warn(utils.T("api.slackimport.slack_add_users.missing_email_address.warn", map[string]interface{}{"Email": email, "Username": sUser.Username}))
}

password := model.NewId()

Expand Down
8 changes: 8 additions & 0 deletions i18n/en.json
Expand Up @@ -1719,6 +1719,14 @@
"id": "api.slackimport.slack_add_channels.failed_to_add_user",
"translation": "Failed to add user to channel: {{.Username}}\r\n"
},
{
"id": "api.slackimport.slack_add_users.missing_email_address",
"translation": "User {{.Username}} does not have an email address in the Slack export. Using {{.Email}} as a placeholder. The user should update their email address once logged in to the system.\r\n"
},
{
"id": "api.slackimport.slack_add_users.missing_email_address.warn",
"translation": "User {{.Username}} does not have an email address in the Slack export. Using {{.Email}} as a placeholder. The user should update their email address once logged in to the system."
},
{
"id": "api.slackimport.slack_add_channels.import_failed",
"translation": "Failed to import: {{.DisplayName}}\r\n"
Expand Down

0 comments on commit a5ae712

Please sign in to comment.