diff options
Diffstat (limited to 'vendor/github.com/slack-go/slack/users.go')
-rw-r--r-- | vendor/github.com/slack-go/slack/users.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vendor/github.com/slack-go/slack/users.go b/vendor/github.com/slack-go/slack/users.go index 5d8cb35f..82657d76 100644 --- a/vendor/github.com/slack-go/slack/users.go +++ b/vendor/github.com/slack-go/slack/users.go @@ -644,10 +644,13 @@ type getUserProfileResponse struct { // GetUserProfileContext retrieves a user's profile information with a context. func (api *Client) GetUserProfileContext(ctx context.Context, userID string, includeLabels bool) (*UserProfile, error) { - values := url.Values{"token": {api.token}, "user": {userID}} + values := url.Values{"token": {api.token}} if includeLabels { values.Add("include_labels", "true") } + if userID != "" { + values.Add("user", userID) + } resp := &getUserProfileResponse{} err := api.postMethod(ctx, "users.profile.get", values, &resp) |