Skip to content

fix: incorrect JSON tag for UserProfile.Skype field #1523

@derodero24

Description

@derodero24

Description

The Skype field in UserProfile struct (users.go) has an incorrect JSON tag "skyp" instead of "skype".

https://github.com/slack-go/slack/blob/master/users.go#L28

Skype string `json:"skyp,omitempty"`

This means the field is never properly populated when unmarshalling Slack API responses, as the API returns "skype" as the key.

The correct tag "skype" is already used in slackevents/inner_events.go:
https://github.com/slack-go/slack/blob/master/slackevents/inner_events.go#L1103

Expected behavior

The JSON tag should be "skype" to match the Slack API response format.

Slack's documentation

https://docs.slack.dev/reference/objects/user-object

profile.skype - Shadow from a bygone era. Always an empty string.

I'm planning to work on this fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions