diff options
-rw-r--r-- | app/slackimport.go | 5 | ||||
-rw-r--r-- | i18n/en.json | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/app/slackimport.go b/app/slackimport.go index c3d968907..5512d8c00 100644 --- a/app/slackimport.go +++ b/app/slackimport.go @@ -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() diff --git a/i18n/en.json b/i18n/en.json index 472d30d5f..509ba3f56 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -1720,6 +1720,14 @@ "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" }, |