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>
Этот коммит содержится в:
@@ -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
|
||||
|
||||
Ссылка в новой задаче
Block a user