[MM-38375] Fix processing bulk import with attachments (#18352)

* Fix improper attachments in replies

* Fix import data path

* Improve errors

* Fix importing attachments directly from zip file

* Add some test cases to cover error paths
Этот коммит содержится в:
Claudio Costa
2021-09-21 17:39:52 +02:00
коммит произвёл GitHub
родитель c4a25ff339
Коммит 0c84885132
10 изменённых файлов: 264 добавлений и 58 удалений

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

@@ -463,7 +463,7 @@ func (a *App) buildPostReplies(postID string, withAttachments bool) ([]ReplyImpo
if appErr != nil {
return nil, nil, appErr
}
replyImportObject.Attachments = &attachments
replyImportObject.Attachments = &postAttachments
if withAttachments && len(postAttachments) > 0 {
attachments = append(attachments, postAttachments...)
}