diff options
author | Wim <wim@42.be> | 2018-08-10 00:38:19 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2018-08-10 00:38:19 +0200 |
commit | 68aeb93afa0dd4a5067fcefff9db0a70644d7128 (patch) | |
tree | fdd80104c029ba57cb27d54850a3aa7020fedfba /vendor/github.com/nlopes/slack/bots.go | |
parent | 51062863a5c34d81e296cf15c61140911037cf3b (diff) | |
download | matterbridge-msglm-68aeb93afa0dd4a5067fcefff9db0a70644d7128.tar.gz matterbridge-msglm-68aeb93afa0dd4a5067fcefff9db0a70644d7128.tar.bz2 matterbridge-msglm-68aeb93afa0dd4a5067fcefff9db0a70644d7128.zip |
Update nlopes/slack vendor
Diffstat (limited to 'vendor/github.com/nlopes/slack/bots.go')
-rw-r--r-- | vendor/github.com/nlopes/slack/bots.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/vendor/github.com/nlopes/slack/bots.go b/vendor/github.com/nlopes/slack/bots.go index 13a78cb1..92570a04 100644 --- a/vendor/github.com/nlopes/slack/bots.go +++ b/vendor/github.com/nlopes/slack/bots.go @@ -19,9 +19,9 @@ type botResponseFull struct { SlackResponse } -func botRequest(ctx context.Context, path string, values url.Values, debug bool) (*botResponseFull, error) { +func botRequest(ctx context.Context, client HTTPRequester, path string, values url.Values, debug bool) (*botResponseFull, error) { response := &botResponseFull{} - err := post(ctx, path, values, response, debug) + err := postSlackMethod(ctx, client, path, values, response, debug) if err != nil { return nil, err } @@ -39,10 +39,11 @@ func (api *Client) GetBotInfo(bot string) (*Bot, error) { // GetBotInfoContext will retrieve the complete bot information using a custom context func (api *Client) GetBotInfoContext(ctx context.Context, bot string) (*Bot, error) { values := url.Values{ - "token": {api.config.token}, + "token": {api.token}, "bot": {bot}, } - response, err := botRequest(ctx, "bots.info", values, api.debug) + + response, err := botRequest(ctx, api.httpclient, "bots.info", values, api.debug) if err != nil { return nil, err } |