summaryrefslogtreecommitdiffstats
path: root/webapp/client/client.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/client/client.jsx')
-rw-r--r--webapp/client/client.jsx13
1 files changed, 13 insertions, 0 deletions
diff --git a/webapp/client/client.jsx b/webapp/client/client.jsx
index 3ec36644f..c5743ae7b 100644
--- a/webapp/client/client.jsx
+++ b/webapp/client/client.jsx
@@ -1187,6 +1187,7 @@ export default class Client {
end(this.handleResponse.bind(this, 'getStatuses', success, error));
}
+ // SCHEDULED FOR DEPRECATION IN 3.8 - use viewChannel instead
setActiveChannel(id, success, error) {
request.
post(`${this.getUsersRoute()}/status/set_active_channel`).
@@ -1366,6 +1367,17 @@ export default class Client {
this.track('api', 'api_channels_delete');
}
+ viewChannel(channelId, prevChannelId = '', time = 0, success, error) {
+ request.
+ post(`${this.getChannelsRoute()}/view`).
+ set(this.defaultHeaders).
+ type('application/json').
+ accept('application/json').
+ send({channel_id: channelId, prev_channel_id: prevChannelId, time}).
+ end(this.handleResponse.bind(this, 'viewChannel', success, error));
+ }
+
+ // SCHEDULED FOR DEPRECATION IN 3.8 - use viewChannel instead
updateLastViewedAt(channelId, active, success, error) {
request.
post(`${this.getChannelNeededRoute(channelId)}/update_last_viewed_at`).
@@ -1376,6 +1388,7 @@ export default class Client {
end(this.handleResponse.bind(this, 'updateLastViewedAt', success, error));
}
+ // SCHEDULED FOR DEPRECATION IN 3.8 - use viewChannel instead
setLastViewedAt(channelId, lastViewedAt, success, error) {
request.
post(`${this.getChannelNeededRoute(channelId)}/set_last_viewed_at`).