summaryrefslogtreecommitdiffstats
path: root/model
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-03-28 08:07:15 -0400
committerGitHub <noreply@github.com>2017-03-28 08:07:15 -0400
commit060b9f92c382052276fa784065af6b18eda70669 (patch)
tree1d1703b1668b017e8461bdfaa07288ed9b3db4a0 /model
parentdaca0d93f621bcb1daae149c178af0631bcd120a (diff)
downloadchat-060b9f92c382052276fa784065af6b18eda70669.tar.gz
chat-060b9f92c382052276fa784065af6b18eda70669.tar.bz2
chat-060b9f92c382052276fa784065af6b18eda70669.zip
Remove API endpoints being deprecated in 3.8 (#5880)
Diffstat (limited to 'model')
-rw-r--r--model/client.go43
1 files changed, 0 insertions, 43 deletions
diff --git a/model/client.go b/model/client.go
index 772265843..74793c5eb 100644
--- a/model/client.go
+++ b/model/client.go
@@ -1191,17 +1191,6 @@ func (c *Client) GetChannel(id, etag string) (*Result, *AppError) {
}
}
-// SCHEDULED FOR DEPRECATION IN 3.7 - use GetMoreChannelsPage instead
-func (c *Client) GetMoreChannels(etag string) (*Result, *AppError) {
- if r, err := c.DoApiGet(c.GetTeamRoute()+"/channels/more", "", etag); err != nil {
- return nil, err
- } else {
- defer closeBody(r)
- return &Result{r.Header.Get(HEADER_REQUEST_ID),
- r.Header.Get(HEADER_ETAG_SERVER), ChannelListFromJson(r.Body)}, nil
- }
-}
-
// GetMoreChannelsPage will return a page of open channels the user is not in based on
// the provided offset and limit. Must be authenticated.
func (c *Client) GetMoreChannelsPage(offset int, limit int) (*Result, *AppError) {
@@ -1333,22 +1322,6 @@ func (c *Client) RemoveChannelMember(id, user_id string) (*Result, *AppError) {
}
}
-// UpdateLastViewedAt will mark a channel as read.
-// The channelId indicates the channel to mark as read. If active is true, push notifications
-// will be cleared if there are unread messages. The default for active is true.
-// SCHEDULED FOR DEPRECATION IN 3.8 - use ViewChannel instead
-func (c *Client) UpdateLastViewedAt(channelId string, active bool) (*Result, *AppError) {
- data := make(map[string]interface{})
- data["active"] = active
- if r, err := c.DoApiPost(c.GetChannelRoute(channelId)+"/update_last_viewed_at", StringInterfaceToJson(data)); err != nil {
- return nil, err
- } else {
- defer closeBody(r)
- return &Result{r.Header.Get(HEADER_REQUEST_ID),
- r.Header.Get(HEADER_ETAG_SERVER), nil}, nil
- }
-}
-
// ViewChannel performs all the actions related to viewing a channel. This includes marking
// 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.
@@ -1792,22 +1765,6 @@ func (c *Client) GetStatusesByIds(userIds []string) (*Result, *AppError) {
}
}
-// SetActiveChannel sets the the channel id the user is currently viewing.
-// The channelId key is required but the value can be blank. Returns standard
-// response.
-// SCHEDULED FOR DEPRECATION IN 3.8 - use ViewChannel instead
-func (c *Client) SetActiveChannel(channelId string) (*Result, *AppError) {
- data := map[string]string{}
- data["channel_id"] = channelId
- if r, err := c.DoApiPost("/users/status/set_active_channel", MapToJson(data)); err != nil {
- return nil, err
- } else {
- defer closeBody(r)
- return &Result{r.Header.Get(HEADER_REQUEST_ID),
- r.Header.Get(HEADER_ETAG_SERVER), MapFromJson(r.Body)}, nil
- }
-}
-
func (c *Client) GetMyTeam(etag string) (*Result, *AppError) {
if r, err := c.DoApiGet(c.GetTeamRoute()+"/me", "", etag); err != nil {
return nil, err