mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-06-27 12:19:23 +00:00
Update vendor (nlopes/slack)
This commit is contained in:
10
vendor/github.com/nlopes/slack/slack.go
generated
vendored
10
vendor/github.com/nlopes/slack/slack.go
generated
vendored
@ -1,6 +1,7 @@
|
||||
package slack
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"log"
|
||||
"net/url"
|
||||
@ -54,8 +55,13 @@ func New(token string) *Client {
|
||||
|
||||
// AuthTest tests if the user is able to do authenticated requests or not
|
||||
func (api *Client) AuthTest() (response *AuthTestResponse, error error) {
|
||||
return api.AuthTestContext(context.Background())
|
||||
}
|
||||
|
||||
// AuthTestContext tests if the user is able to do authenticated requests or not with a custom context
|
||||
func (api *Client) AuthTestContext(ctx context.Context) (response *AuthTestResponse, error error) {
|
||||
responseFull := &authTestResponseFull{}
|
||||
err := post("auth.test", url.Values{"token": {api.config.token}}, responseFull, api.debug)
|
||||
err := post(ctx, "auth.test", url.Values{"token": {api.config.token}}, responseFull, api.debug)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -71,7 +77,7 @@ func (api *Client) AuthTest() (response *AuthTestResponse, error error) {
|
||||
func (api *Client) SetDebug(debug bool) {
|
||||
api.debug = debug
|
||||
if debug && logger == nil {
|
||||
logger = log.New(os.Stdout, "nlopes/slack", log.LstdFlags | log.Lshortfile)
|
||||
logger = log.New(os.Stdout, "nlopes/slack", log.LstdFlags|log.Lshortfile)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user