summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/nlopes/slack/emoji.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/nlopes/slack/emoji.go')
-rw-r--r--vendor/github.com/nlopes/slack/emoji.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/vendor/github.com/nlopes/slack/emoji.go b/vendor/github.com/nlopes/slack/emoji.go
index 776c4a5f..5da9da41 100644
--- a/vendor/github.com/nlopes/slack/emoji.go
+++ b/vendor/github.com/nlopes/slack/emoji.go
@@ -1,6 +1,7 @@
package slack
import (
+ "context"
"errors"
"net/url"
)
@@ -12,11 +13,16 @@ type emojiResponseFull struct {
// GetEmoji retrieves all the emojis
func (api *Client) GetEmoji() (map[string]string, error) {
+ return api.GetEmojiContext(context.Background())
+}
+
+// GetEmojiContext retrieves all the emojis with a custom context
+func (api *Client) GetEmojiContext(ctx context.Context) (map[string]string, error) {
values := url.Values{
"token": {api.config.token},
}
response := &emojiResponseFull{}
- err := post("emoji.list", values, response, api.debug)
+ err := post(ctx, "emoji.list", values, response, api.debug)
if err != nil {
return nil, err
}