summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/nlopes/slack/bots.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/nlopes/slack/bots.go')
-rw-r--r--vendor/github.com/nlopes/slack/bots.go9
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
}