add support for exporting and importing props (#14034)

* add support for exporting and importing props

* merge master

* add export test for post props

* add check if postData exists

* add import tests for post props

* fix ci bot issues

Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>

* fix gofmt errors

* remove test comment and add name instead

* remove uneccessary changes

Co-authored-by: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>
Этот коммит содержится в:
Sven Hüster
2020-03-23 14:21:05 +01:00
коммит произвёл GitHub
родитель b718618fbc
Коммит 37ac6654f6
5 изменённых файлов: 105 добавлений и 4 удалений

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

@@ -1111,6 +1111,10 @@ func (a *App) importMultiplePosts(data []*PostImportData, dryRun bool) *model.Ap
post.CreateAt = *postData.CreateAt
post.Hashtags, _ = model.ParseHashtags(post.Message)
if postData.Props != nil {
post.Props = *postData.Props
}
fileIds, err := a.uploadAttachments(postData.Attachments, post, team.Id, dryRun)
if err != nil {
return err
@@ -1382,6 +1386,10 @@ func (a *App) importMultipleDirectPosts(data []*DirectPostImportData, dryRun boo
post.CreateAt = *postData.CreateAt
post.Hashtags, _ = model.ParseHashtags(post.Message)
if postData.Props != nil {
post.Props = *postData.Props
}
fileIds, err := a.uploadAttachments(postData.Attachments, post, "noteam", dryRun)
if err != nil {
return err