Этот коммит содержится в:
Nicolas Clerc
2016-02-15 10:24:58 +01:00
родитель 49eda73749
Коммит 7cb817d5a7
2 изменённых файлов: 9 добавлений и 3 удалений

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

@@ -363,8 +363,11 @@ func (c *Client) Command(channelId string, command string, suggest bool) (*Resul
}
}
func (c *Client) ListCommands() (*Result, *AppError) {
if r, err := c.DoApiGet("/commands/list", "", ""); err != nil {
func (c *Client) ListCommands(channelId string, command string) (*Result, *AppError) {
m := make(map[string]string)
m["command"] = command
m["channelId"] = channelId
if r, err := c.DoApiPost("/commands/list", MapToJson(m)); err != nil {
return nil, err
} else {
return &Result{r.Header.Get(HEADER_REQUEST_ID),