[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 удалений

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

@@ -23,11 +23,16 @@ const (
)
func stopOnError(err LineImportWorkerError) bool {
if err.Error.Id == "api.file.upload_file.large_image.app_error" {
switch err.Error.Id {
case "api.file.upload_file.large_image.app_error":
mlog.Warn("Large image import error", mlog.Err(err.Error))
return false
case "app.import.validate_direct_channel_import_data.members_too_few.error", "app.import.validate_direct_channel_import_data.members_too_many.error":
mlog.Warn("Invalid direct channel import data", mlog.Err(err.Error))
return false
default:
return true
}
return true
}
func rewriteAttachmentPaths(files *[]AttachmentImportData, basePath string) {