diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-02-07 12:36:37 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-07 12:36:37 -0800 |
commit | 487bb56a9b8f5c7a9efaabfc631f2f6c689ef74b (patch) | |
tree | a92bcbe004045581752c33dfd126c211300cda25 /app/notification.go | |
parent | eb767d2c1cb65724f25479144d68a9d102d32dfa (diff) | |
download | chat-487bb56a9b8f5c7a9efaabfc631f2f6c689ef74b.tar.gz chat-487bb56a9b8f5c7a9efaabfc631f2f6c689ef74b.tar.bz2 chat-487bb56a9b8f5c7a9efaabfc631f2f6c689ef74b.zip |
Add caching for file infos (#5330)
Diffstat (limited to 'app/notification.go')
-rw-r--r-- | app/notification.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/notification.go b/app/notification.go index cc4e13ab1..1550c0393 100644 --- a/app/notification.go +++ b/app/notification.go @@ -26,7 +26,7 @@ import ( func SendNotifications(post *model.Post, team *model.Team, channel *model.Channel, sender *model.User) ([]string, *model.AppError) { pchan := Srv.Store.User().GetAllProfilesInChannel(channel.Id, true) - fchan := Srv.Store.FileInfo().GetForPost(post.Id) + fchan := Srv.Store.FileInfo().GetForPost(post.Id, true) var profileMap map[string]*model.User if result := <-pchan; result.Err != nil { @@ -414,7 +414,7 @@ func GetMessageForNotification(post *model.Post, translateFunc i18n.TranslateFun // extract the filenames from their paths and determine what type of files are attached var infos []*model.FileInfo - if result := <-Srv.Store.FileInfo().GetForPost(post.Id); result.Err != nil { + if result := <-Srv.Store.FileInfo().GetForPost(post.Id, true); result.Err != nil { l4g.Warn(utils.T("api.post.get_message_for_notification.get_files.error"), post.Id, result.Err) } else { infos = result.Data.([]*model.FileInfo) |