[MM-34216] app/import: do not break import process if a dm channel is invalid (#17391)

* app/import: do not break import process if a dm channel is invalid

* update test headers

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Ibrahim Serdar Acikgoz
2021-04-22 12:42:22 +03:00
коммит произвёл GitHub
родитель f6505e1ee6
Коммит 5f9870ac06
4 изменённых файлов: 77 добавлений и 26 удалений

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

@@ -610,6 +610,11 @@ func (a *App) exportAllDirectChannels(writer io.Writer) *model.AppError {
for _, channel := range channels {
afterId = channel.Id
// Skip if there are no active members in the channel
if len(*channel.Members) == 0 {
continue
}
// Skip deleted.
if channel.DeleteAt != 0 {
continue