Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Don't require skin_tone for rich text emoji element #1341

Merged
merged 3 commits into from
Nov 12, 2024

Conversation

calebmckay
Copy link
Contributor

In a rich text emoji element, the skin_tone value is optional, and when not provided will use the default skin tone. When unmarshalling from JSON, this parameter defaults to an invalid value of 0 (skin_tone values range from 2 to 6), resulting in an "invalid_blocks" error when sending a message. This PR allows the skin_tone element to be omitted when unmarshalling from JSON.

@calebmckay
Copy link
Contributor Author

Working on adding test cases now, to make sure both marshalling and unmarshalling work as expected.

@lorenzoaiello lorenzoaiello added the bugfix [PR] bugfix label Nov 6, 2024
@lorenzoaiello lorenzoaiello self-assigned this Nov 6, 2024
Copy link
Contributor

@lorenzoaiello lorenzoaiello left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution, this looks good - and I appreciate the backwards compatibility.

@lorenzoaiello lorenzoaiello changed the title Don't require skin_tone for rich text emoji element fix: Don't require skin_tone for rich text emoji element Nov 12, 2024
@lorenzoaiello lorenzoaiello merged commit 52fcd3d into slack-go:master Nov 12, 2024
7 checks passed
@calebmckay calebmckay deleted the patch-1 branch November 12, 2024 19:32
gautamr95 pushed a commit to pylon-labs/slack that referenced this pull request Dec 13, 2024
…1341)

In a rich text `emoji` element, the `skin_tone` value is optional, and
when not provided will use the default skin tone. When unmarshalling
from JSON, this parameter defaults to an invalid value of 0 (`skin_tone`
values range from 2 to 6), resulting in an "invalid_blocks" error when
sending a message. This PR allows the `skin_tone` element to be omitted
when unmarshalling from JSON.
gautamr95 pushed a commit to pylon-labs/slack that referenced this pull request Dec 13, 2024
…1341)

In a rich text `emoji` element, the `skin_tone` value is optional, and
when not provided will use the default skin tone. When unmarshalling
from JSON, this parameter defaults to an invalid value of 0 (`skin_tone`
values range from 2 to 6), resulting in an "invalid_blocks" error when
sending a message. This PR allows the `skin_tone` element to be omitted
when unmarshalling from JSON.
gautamr95 pushed a commit to pylon-labs/slack that referenced this pull request Dec 13, 2024
…1341)

In a rich text `emoji` element, the `skin_tone` value is optional, and
when not provided will use the default skin tone. When unmarshalling
from JSON, this parameter defaults to an invalid value of 0 (`skin_tone`
values range from 2 to 6), resulting in an "invalid_blocks" error when
sending a message. This PR allows the `skin_tone` element to be omitted
when unmarshalling from JSON.
gautamr95 pushed a commit to pylon-labs/slack that referenced this pull request Dec 13, 2024
…1341)

In a rich text `emoji` element, the `skin_tone` value is optional, and
when not provided will use the default skin tone. When unmarshalling
from JSON, this parameter defaults to an invalid value of 0 (`skin_tone`
values range from 2 to 6), resulting in an "invalid_blocks" error when
sending a message. This PR allows the `skin_tone` element to be omitted
when unmarshalling from JSON.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix [PR] bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants