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

Wrong element type for timestamp in RichTextSectionElement.Date #1363

Closed
jed204 opened this issue Sep 7, 2024 · 2 comments · Fixed by #1364
Closed

Wrong element type for timestamp in RichTextSectionElement.Date #1363

jed204 opened this issue Sep 7, 2024 · 2 comments · Fixed by #1364
Labels
bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented project:slack-api-model project:slack-api-model
Milestone

Comments

@jed204
Copy link
Contributor

jed204 commented Sep 7, 2024

The timestamp element in doesn't align with the type in the reference documentation. https://api.slack.com/reference/block-kit/blocks#date-element-type

This leads to the block being invalid and rejected by the server.

The Slack SDK version

1.4.2

Expected result:

RichTextSectionElement.Date.builder().format("{date_num}").timestamp(Instant.now().getEpochSecond() + "").build()

should encode to:

{
  "type" : "date",
  "timestamp" : 1725726588,
  "format" : "{date_num}",
}

(this format passes the Block Kit Builder checks)

Actual result:

{
  "type" : "date",
  "timestamp" : "1725726588",
  "format" : "{date_num}",
}

(this format fails the Block Kit Builder checks due to invalid type)

@seratch seratch added bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented project:slack-api-model project:slack-api-model and removed untriaged labels Sep 8, 2024
@seratch seratch added this to the 1.42.1 milestone Sep 8, 2024
@seratch seratch changed the title slack-api-model wrong element type for timestamp in RichTextSectionElement.Date Wrong element type for timestamp in RichTextSectionElement.Date Sep 10, 2024
@jed204
Copy link
Contributor Author

jed204 commented Sep 12, 2024

@seratch any idea on timing of the 1.4.2.1 release? Not a huge rush on my side - just looking for a broad timeframe. Thanks!

@seratch
Copy link
Member

seratch commented Sep 12, 2024

I plan to release the version tomorrow! At the latest, by the end of this week for sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented project:slack-api-model project:slack-api-model
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants