Migrates Channel.GetDeletedByName to sync by default (#11203)

Этот коммит содержится в:
Rodrigo Villablanca Vásquez
2019-06-21 02:32:14 -04:00
коммит произвёл Jesús Espino
родитель e9e65fe8bb
Коммит 9ad2dd9514
5 изменённых файлов: 28 добавлений и 23 удалений

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

@@ -510,7 +510,7 @@ func (a *App) SlackAddChannels(teamId string, slackchannels []SlackChannel, post
if mChannel, err = a.Srv.Store.Channel().GetByName(teamId, sChannel.Name, true); err == nil {
// The channel already exists as an active channel. Merge with the existing one.
importerLog.WriteString(utils.T("api.slackimport.slack_add_channels.merge", map[string]interface{}{"DisplayName": newChannel.DisplayName}))
} else if result := <-a.Srv.Store.Channel().GetDeletedByName(teamId, sChannel.Name); result.Err == nil {
} else if _, err := a.Srv.Store.Channel().GetDeletedByName(teamId, sChannel.Name); err == nil {
// The channel already exists but has been deleted. Generate a random string for the handle instead.
newChannel.Name = model.NewId()
newChannel = SlackSanitiseChannelProperties(newChannel)