diff options
-rw-r--r-- | api/slackimport.go | 6 | ||||
-rw-r--r-- | i18n/en.json | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/api/slackimport.go b/api/slackimport.go index 90e92cf0a..15f5f43f4 100644 --- a/api/slackimport.go +++ b/api/slackimport.go @@ -162,7 +162,11 @@ func SlackAddUsers(teamId string, slackusers []SlackUser, log *bytes.Buffer) map if result := <-Srv.Store.User().GetByEmail(email); result.Err == nil { existingUser := result.Data.(*model.User) addedUsers[sUser.Id] = existingUser - log.WriteString(utils.T("api.slackimport.slack_add_users.merge_existing", map[string]interface{}{"Email": existingUser.Email, "Username": existingUser.Username})) + if err := JoinUserToTeam(team, addedUsers[sUser.Id]); err != nil { + log.WriteString(utils.T("api.slackimport.slack_add_users.merge_existing_failed", map[string]interface{}{"Email": existingUser.Email, "Username": existingUser.Username})) + } else { + log.WriteString(utils.T("api.slackimport.slack_add_users.merge_existing", map[string]interface{}{"Email": existingUser.Email, "Username": existingUser.Username})) + } continue } diff --git a/i18n/en.json b/i18n/en.json index 10652ba72..1cf41377e 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -1644,6 +1644,10 @@ "translation": "Merged user with existing account: {{.Email}}, {{.Username}}\r\n" }, { + "id": "api.slackimport.slack_add_users.merge_existing_failed", + "translation": "Tried to merge user with existing account: {{.Email}}, {{.Username}}, but failed to add the user to this team.\r\n" + }, + { "id": "api.slackimport.slack_add_users.unable_import", "translation": "Unable to import user: {{.Username}}\r\n" }, |