summaryrefslogtreecommitdiffstats
path: root/model/client4.go
diff options
context:
space:
mode:
Diffstat (limited to 'model/client4.go')
-rw-r--r--model/client4.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/model/client4.go b/model/client4.go
index 42e89fd9c..eb8568a5e 100644
--- a/model/client4.go
+++ b/model/client4.go
@@ -1570,13 +1570,13 @@ func (c *Client4) GetChannelMembersForUser(userId, teamId, etag string) (*Channe
}
// ViewChannel performs a view action for a user. Synonymous with switching channels or marking channels as read by a user.
-func (c *Client4) ViewChannel(userId string, view *ChannelView) (bool, *Response) {
+func (c *Client4) ViewChannel(userId string, view *ChannelView) (*ChannelViewResponse, *Response) {
url := fmt.Sprintf(c.GetChannelsRoute()+"/members/%v/view", userId)
if r, err := c.DoApiPost(url, view.ToJson()); err != nil {
- return false, BuildErrorResponse(r, err)
+ return nil, BuildErrorResponse(r, err)
} else {
defer closeBody(r)
- return CheckStatusOK(r), BuildResponse(r)
+ return ChannelViewResponseFromJson(r.Body), BuildResponse(r)
}
}