PLT-5018 Fix thumbnails of imported attachments. (#4934)
Этот коммит содержится в:
коммит произвёл
enahum
родитель
4ccfbbdcf1
Коммит
53509174b1
@@ -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
|
||||
|
||||
@@ -1173,6 +1173,10 @@
|
||||
"id": "api.general.init.debug",
|
||||
"translation": "Initializing general API routes"
|
||||
},
|
||||
{
|
||||
"id": "api.import.import_post.attach_files.error",
|
||||
"translation": "Error attaching files to post. postId=%v, fileIds=%v, message=%v"
|
||||
},
|
||||
{
|
||||
"id": "api.import.import_post.saving.debug",
|
||||
"translation": "Error saving post. user=%v, message=%v"
|
||||
|
||||
Ссылка в новой задаче
Block a user