diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-12-23 10:32:30 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-23 10:32:30 -0500 |
commit | 217cdf447a995fd8f2700b14ba790360ccaeabf6 (patch) | |
tree | ca0b01c4cd869fbadd1d5a831b5775ca9dc066dc /api/post.go | |
parent | ffd6ccde2ed4b1d374d0835c5638a189df60a679 (diff) | |
download | chat-217cdf447a995fd8f2700b14ba790360ccaeabf6.tar.gz chat-217cdf447a995fd8f2700b14ba790360ccaeabf6.tar.bz2 chat-217cdf447a995fd8f2700b14ba790360ccaeabf6.zip |
PLT-5073 Improve performance of /channels/view endpoint (#4881)
* Improve performance of /channels/view endpoint
* Fix store unit test
Diffstat (limited to 'api/post.go')
-rw-r--r-- | api/post.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/api/post.go b/api/post.go index acbd0acd7..5cce766c0 100644 --- a/api/post.go +++ b/api/post.go @@ -95,7 +95,7 @@ func createPost(c *Context, w http.ResponseWriter, r *http.Request) { } else { // Update the LastViewAt only if the post does not have from_webhook prop set (eg. Zapier app) if _, ok := post.Props["from_webhook"]; !ok { - if result := <-Srv.Store.Channel().UpdateLastViewedAt(post.ChannelId, c.Session.UserId); result.Err != nil { + if result := <-Srv.Store.Channel().UpdateLastViewedAt([]string{post.ChannelId}, c.Session.UserId); result.Err != nil { l4g.Error(utils.T("api.post.create_post.last_viewed.error"), post.ChannelId, c.Session.UserId, result.Err) } } |