summaryrefslogtreecommitdiffstats
path: root/model/client.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-12-23 10:32:30 -0500
committerGitHub <noreply@github.com>2016-12-23 10:32:30 -0500
commit217cdf447a995fd8f2700b14ba790360ccaeabf6 (patch)
treeca0b01c4cd869fbadd1d5a831b5775ca9dc066dc /model/client.go
parentffd6ccde2ed4b1d374d0835c5638a189df60a679 (diff)
downloadchat-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 'model/client.go')
-rw-r--r--model/client.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/model/client.go b/model/client.go
index 1f87c619e..4a6cb169f 100644
--- a/model/client.go
+++ b/model/client.go
@@ -1350,10 +1350,9 @@ func (c *Client) UpdateLastViewedAt(channelId string, active bool) (*Result, *Ap
}
// ViewChannel performs all the actions related to viewing a channel. This includes marking
-// the channel and the previous one as read, marking the channel as being actively viewed.
+// the channel and the previous one as read, and marking the channel as being actively viewed.
// ChannelId is required but may be blank to indicate no channel is being viewed.
-// PrevChannelId is optional, populate to indicate a channel switch occurred. Optionally
-// provide a non-zero Time, in Unix milliseconds, to manually set the viewing time.
+// PrevChannelId is optional, populate to indicate a channel switch occurred.
func (c *Client) ViewChannel(params ChannelView) (bool, *ResponseMetadata) {
if r, err := c.DoApiPost(c.GetTeamRoute()+"/channels/view", params.ToJson()); err != nil {
return false, &ResponseMetadata{StatusCode: r.StatusCode, Error: err}