java-slack-sdk icon indicating copy to clipboard operation
java-slack-sdk copied to clipboard

Support description of mrkdwn type in OptionObject

Open jbenallen opened this issue 8 months ago • 1 comments

Need to read options in a checkbox from Slack using the Java SDK. Currently, description text objects inside an option are always coerced into a PlainTextObject even if their type property is set to mrkdwn.

Category (place an x in each of the [ ])

  • [ ] bolt (Bolt for Java)
  • [ ] bolt-{sub modules} (Bolt for Java - optional modules)
  • [ ] slack-api-client (Slack API Clients)
  • [x] slack-api-model (Slack API Data Models)
  • [ ] slack-api-*-kotlin-extension (Kotlin Extensions for Slack API Clients)
  • [ ] slack-app-backend (The primitive layer of Bolt for Java)

Requirements

Slack supports options with description text objects that use mrkdwn type. The SDK coerces them into a PlainTextObject, resulting in a lossy translation.

Consider changing the description field in the com.slack.api.model.block.composition.OptionObject to a com.slack.api.model.block.composition.TextObject so it can support either plain text or markdown.

jbenallen avatar May 08 '25 18:05 jbenallen

Hi @jbenallen thanks for bring this up 💯

It seems like a reasonable request, we will try to address it in the near future

WilliamBergamin avatar May 08 '25 19:05 WilliamBergamin