diff options
Diffstat (limited to 'api4/channel.go')
-rw-r--r-- | api4/channel.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/api4/channel.go b/api4/channel.go index 9eaa6ec8a..74eb1a972 100644 --- a/api4/channel.go +++ b/api4/channel.go @@ -709,12 +709,20 @@ func viewChannel(c *Context, w http.ResponseWriter, r *http.Request) { return } - if err := c.App.ViewChannel(view, c.Params.UserId, !c.Session.IsMobileApp()); err != nil { + times, err := c.App.ViewChannel(view, c.Params.UserId, !c.Session.IsMobileApp()) + + if err != nil { c.Err = err return } - ReturnStatusOK(w) + // Returning {"status": "OK", ...} for backwards compatability + resp := &model.ChannelViewResponse{ + Status: "OK", + LastViewedAtTimes: times, + } + + w.Write([]byte(resp.ToJson())) } func updateChannelMemberRoles(c *Context, w http.ResponseWriter, r *http.Request) { |