diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-03-17 11:45:42 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-03-17 11:45:42 -0400 |
commit | 6b9d89522475c84e7833d17179b3af65b92240d6 (patch) | |
tree | cf5fc21b47bdf745a47541eb8beb2c85084a5015 /model/client.go | |
parent | d42459729c6015b07c2f0d872a44212e93bccb39 (diff) | |
parent | c94b7b9d4fe2c51e6427888d9ba6e3d7b8eb321c (diff) | |
download | chat-6b9d89522475c84e7833d17179b3af65b92240d6.tar.gz chat-6b9d89522475c84e7833d17179b3af65b92240d6.tar.bz2 chat-6b9d89522475c84e7833d17179b3af65b92240d6.zip |
Merge pull request #2169 from kernicPanel/external-slashcommands-management
PLT-2183 Slash command auto-complete
Diffstat (limited to 'model/client.go')
-rw-r--r-- | model/client.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/model/client.go b/model/client.go index 3adcb980d..14c175fc1 100644 --- a/model/client.go +++ b/model/client.go @@ -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), |