Этот коммит содержится в:
Joram Wilander
2017-02-07 12:36:37 -08:00
коммит произвёл GitHub
родитель eb767d2c1c
Коммит 487bb56a9b
7 изменённых файлов: 61 добавлений и 10 удалений

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

@@ -457,7 +457,7 @@ func SearchPostsInTeam(terms string, userId string, teamId string, isOrSearch bo
func GetFileInfosForPost(postId string) ([]*model.FileInfo, *model.AppError) {
pchan := Srv.Store.Post().Get(postId)
fchan := Srv.Store.FileInfo().GetForPost(postId)
fchan := Srv.Store.FileInfo().GetForPost(postId, true)
var infos []*model.FileInfo
if result := <-fchan; result.Err != nil {
@@ -476,6 +476,7 @@ func GetFileInfosForPost(postId string) ([]*model.FileInfo, *model.AppError) {
}
if len(post.Filenames) > 0 {
Srv.Store.FileInfo().InvalidateFileInfosForPostCache(postId)
// The post has Filenames that need to be replaced with FileInfos
infos = MigrateFilenamesToFileInfos(post)
}