diff options
Diffstat (limited to 'vendor/github.com/nlopes/slack/emoji.go')
-rw-r--r-- | vendor/github.com/nlopes/slack/emoji.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/vendor/github.com/nlopes/slack/emoji.go b/vendor/github.com/nlopes/slack/emoji.go index aed2129f..b2b0c6c9 100644 --- a/vendor/github.com/nlopes/slack/emoji.go +++ b/vendor/github.com/nlopes/slack/emoji.go @@ -2,7 +2,6 @@ package slack import ( "context" - "errors" "net/url" ) @@ -23,12 +22,14 @@ func (api *Client) GetEmojiContext(ctx context.Context) (map[string]string, erro } response := &emojiResponseFull{} - err := postSlackMethod(ctx, api.httpclient, "emoji.list", values, response, api) + err := api.postMethod(ctx, "emoji.list", values, response) if err != nil { return nil, err } - if !response.Ok { - return nil, errors.New(response.Error) + + if response.Err() != nil { + return nil, response.Err() } + return response.Emoji, nil } |