PLT-5073 Improve performance of /channels/view endpoint (#4881)

* Improve performance of /channels/view endpoint

* Fix store unit test
Этот коммит содержится в:
Joram Wilander
2016-12-23 10:32:30 -05:00
коммит произвёл GitHub
родитель ffd6ccde2e
Коммит 217cdf447a
12 изменённых файлов: 74 добавлений и 63 удалений

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

@@ -76,7 +76,7 @@ func updateLastViewedAt(c *Context, w http.ResponseWriter, r *http.Request) {
}
}()
Srv.Store.Channel().UpdateLastViewedAt(id, c.Session.UserId)
Srv.Store.Channel().UpdateLastViewedAt([]string{id}, c.Session.UserId)
// Must be after update so that unread count is correct
if doClearPush {