Merge remote-tracking branch 'origin/master' into advanced-permissions-phase-1

Этот коммит содержится в:
Martin Kraft
2018-03-27 09:01:42 -04:00
родитель d8b4207018 9e6db178b0
Коммит e13e64711f
42 изменённых файлов: 1028 добавлений и 193 удалений

Просмотреть файл

@@ -1748,6 +1748,17 @@ func (c *Client4) RemoveUserFromChannel(channelId, userId string) (bool, *Respon
}
}
// AutocompleteChannelsForTeam will return an ordered list of channels autocomplete suggestions
func (c *Client4) AutocompleteChannelsForTeam(teamId, name string) (*ChannelList, *Response) {
query := fmt.Sprintf("?name=%v", name)
if r, err := c.DoApiGet(c.GetChannelsForTeamRoute(teamId)+"/autocomplete"+query, ""); err != nil {
return nil, BuildErrorResponse(r, err)
} else {
defer closeBody(r)
return ChannelListFromJson(r.Body), BuildResponse(r)
}
}
// Post Section
// CreatePost creates a post based on the provided post struct.