Adding is_pinned attribute to post and direct_post objects when doing bulk import (#19487)
* refactor: added is_pinned attribute to post and direct_post objects when doing bulk import * fix: handling IsPinned nil value in post and direct_post objects import * refactor: added pinned post tests for post and direct_post objects import * refactor: TestImportimportMultiplePostLines code enhancements + added pinned post tests in TestImportImportDirectPost * fix: test message text * fix: typo Post => DirectPost * fix: typo Post => DirectPost * refactor: remove redundant test * refactor: test enhancements * refactor: remove print statements. * refactor: using require instead of assert Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
9521797b15
Коммит
3f5eb5f6f7
@@ -1407,6 +1407,9 @@ func (a *App) importMultiplePostLines(c *request.Context, lines []LineImportWork
|
||||
if line.Post.Props != nil {
|
||||
post.Props = *line.Post.Props
|
||||
}
|
||||
if line.Post.IsPinned != nil {
|
||||
post.IsPinned = *line.Post.IsPinned
|
||||
}
|
||||
|
||||
fileIDs := a.uploadAttachments(c, line.Post.Attachments, post, team.Id)
|
||||
for _, fileID := range post.FileIds {
|
||||
@@ -1715,6 +1718,9 @@ func (a *App) importMultipleDirectPostLines(c *request.Context, lines []LineImpo
|
||||
if line.DirectPost.Props != nil {
|
||||
post.Props = *line.DirectPost.Props
|
||||
}
|
||||
if line.DirectPost.IsPinned != nil {
|
||||
post.IsPinned = *line.DirectPost.IsPinned
|
||||
}
|
||||
|
||||
fileIDs := a.uploadAttachments(c, line.DirectPost.Attachments, post, "noteam")
|
||||
for _, fileID := range post.FileIds {
|
||||
|
||||
Ссылка в новой задаче
Block a user