diff options
Diffstat (limited to 'vendor/github.com/slack-go')
-rw-r--r-- | vendor/github.com/slack-go/slack/dialog_text.go | 2 | ||||
-rw-r--r-- | vendor/github.com/slack-go/slack/files.go | 2 | ||||
-rw-r--r-- | vendor/github.com/slack-go/slack/info.go | 5 | ||||
-rw-r--r-- | vendor/github.com/slack-go/slack/internal/backoff/backoff.go | 2 | ||||
-rw-r--r-- | vendor/github.com/slack-go/slack/misc.go | 2 | ||||
-rw-r--r-- | vendor/github.com/slack-go/slack/stars.go | 19 |
6 files changed, 19 insertions, 13 deletions
diff --git a/vendor/github.com/slack-go/slack/dialog_text.go b/vendor/github.com/slack-go/slack/dialog_text.go index da06bd6d..25fa1b69 100644 --- a/vendor/github.com/slack-go/slack/dialog_text.go +++ b/vendor/github.com/slack-go/slack/dialog_text.go @@ -18,7 +18,7 @@ const ( ) // TextInputElement subtype of DialogInput -// https://api.slack.com/dialogs#option_element_attributes#text_element_attributes +// https://api.slack.com/dialogs#option_element_attributes#text_element_attributes type TextInputElement struct { DialogInput MaxLength int `json:"max_length,omitempty"` diff --git a/vendor/github.com/slack-go/slack/files.go b/vendor/github.com/slack-go/slack/files.go index e7e71c49..e7cfe1fe 100644 --- a/vendor/github.com/slack-go/slack/files.go +++ b/vendor/github.com/slack-go/slack/files.go @@ -299,7 +299,7 @@ func (api *Client) UploadFile(params FileUploadParameters) (file *File, err erro func (api *Client) UploadFileContext(ctx context.Context, params FileUploadParameters) (file *File, err error) { // Test if user token is valid. This helps because client.Do doesn't like this for some reason. XXX: More // investigation needed, but for now this will do. - _, err = api.AuthTest() + _, err = api.AuthTestContext(ctx) if err != nil { return nil, err } diff --git a/vendor/github.com/slack-go/slack/info.go b/vendor/github.com/slack-go/slack/info.go index fde2bc98..b06dffdb 100644 --- a/vendor/github.com/slack-go/slack/info.go +++ b/vendor/github.com/slack-go/slack/info.go @@ -409,6 +409,11 @@ func (t JSONTime) Time() time.Time { func (t *JSONTime) UnmarshalJSON(buf []byte) error { s := bytes.Trim(buf, `"`) + if bytes.EqualFold(s, []byte("null")) { + *t = JSONTime(0) + return nil + } + v, err := strconv.Atoi(string(s)) if err != nil { return err diff --git a/vendor/github.com/slack-go/slack/internal/backoff/backoff.go b/vendor/github.com/slack-go/slack/internal/backoff/backoff.go index df210f80..833e9f2b 100644 --- a/vendor/github.com/slack-go/slack/internal/backoff/backoff.go +++ b/vendor/github.com/slack-go/slack/internal/backoff/backoff.go @@ -51,7 +51,7 @@ func (b *Backoff) Duration() (dur time.Duration) { return dur } -//Resets the current value of the counter back to Min +// Resets the current value of the counter back to Min func (b *Backoff) Reset() { b.attempts = 0 } diff --git a/vendor/github.com/slack-go/slack/misc.go b/vendor/github.com/slack-go/slack/misc.go index bb99f2c4..9180116a 100644 --- a/vendor/github.com/slack-go/slack/misc.go +++ b/vendor/github.com/slack-go/slack/misc.go @@ -50,7 +50,7 @@ type SlackErrorResponse struct { func (r SlackErrorResponse) Error() string { return r.Err } -// RateLimitedError represents the rate limit respond from slack +// RateLimitedError represents the rate limit response from slack type RateLimitedError struct { RetryAfter time.Duration } diff --git a/vendor/github.com/slack-go/slack/stars.go b/vendor/github.com/slack-go/slack/stars.go index 52967604..6e0ebbe3 100644 --- a/vendor/github.com/slack-go/slack/stars.go +++ b/vendor/github.com/slack-go/slack/stars.go @@ -130,17 +130,18 @@ func (api *Client) ListStarsContext(ctx context.Context, params StarsParameters) // GetStarred returns a list of StarredItem items. // // The user then has to iterate over them and figure out what they should -// be looking at according to what is in the Type. -// for _, item := range items { -// switch c.Type { -// case "file_comment": -// log.Println(c.Comment) -// case "file": -// ... +// be looking at according to what is in the Type: +// +// for _, item := range items { +// switch c.Type { +// case "file_comment": +// log.Println(c.Comment) +// case "file": +// ... +// } // -// } // This function still exists to maintain backwards compatibility. -// I exposed it as returning []StarredItem, so it shall stay as StarredItem +// I exposed it as returning []StarredItem, so it shall stay as StarredItem. func (api *Client) GetStarred(params StarsParameters) ([]StarredItem, *Paging, error) { return api.GetStarredContext(context.Background(), params) } |