MM-15864 - Made Post.GetRepliesForExport sync (#11046)
* Changed Post.GetRepliesForExport to be sync * Removed else, and renamed err * renamed result variable to replyPosts
Этот коммит содержится в:
коммит произвёл
Jesse Hallam
родитель
6a42ad2af5
Коммит
2d14eef6c7
@@ -379,14 +379,12 @@ func (a *App) ExportAllPosts(writer io.Writer) *model.AppError {
|
||||
func (a *App) buildPostReplies(postId string) (*[]ReplyImportData, *model.AppError) {
|
||||
var replies []ReplyImportData
|
||||
|
||||
result := <-a.Srv.Store.Post().GetRepliesForExport(postId)
|
||||
replyPosts, err := a.Srv.Store.Post().GetRepliesForExport(postId)
|
||||
|
||||
if result.Err != nil {
|
||||
return nil, result.Err
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
replyPosts := result.Data.([]*model.ReplyForExport)
|
||||
|
||||
for _, reply := range replyPosts {
|
||||
replyImportObject := ImportReplyFromPost(reply)
|
||||
if reply.HasReactions == true {
|
||||
|
||||
Ссылка в новой задаче
Block a user