PLT-5018 Fix thumbnails of imported attachments. (#4934)

Этот коммит содержится в:
George Goldberg
2017-01-03 14:50:53 +00:00
коммит произвёл enahum
родитель 4ccfbbdcf1
Коммит 53509174b1
2 изменённых файлов: 10 добавлений и 0 удалений

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

@@ -35,6 +35,12 @@ func ImportPost(post *model.Post) {
l4g.Debug(utils.T("api.import.import_post.saving.debug"), post.UserId, post.Message)
}
for _, fileId := range post.FileIds {
if result := <-Srv.Store.FileInfo().AttachToPost(fileId, post.Id); result.Err != nil {
l4g.Error(utils.T("api.import.import_post.attach_files.error"), post.Id, post.FileIds, result.Err)
}
}
post.Id = ""
post.CreateAt++
post.Message = remainder