forked from lug/matterbridge
Update nlopes/slack vendor
This commit is contained in:
9
vendor/github.com/nlopes/slack/bots.go
generated
vendored
9
vendor/github.com/nlopes/slack/bots.go
generated
vendored
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user