PLT-5479: Import Slack team without emails. (#5597)

Use a fake email address for now, and inform the user doing the import
clearly that this has been done.
Этот коммит содержится в:
George Goldberg
2017-03-02 14:12:23 +00:00
коммит произвёл Corey Hulen
родитель 2e5ebac615
Коммит f513879ffc
2 изменённых файлов: 13 добавлений и 0 удалений

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

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

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

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