slackapi / java-slack-sdk

Slack Developer Kit (including Bolt for Java) for any JVM language
https://slack.dev/java-slack-sdk/
MIT License
570 stars 209 forks source link

RichTextSectionElement.Broadcast does not have style property #1257

Closed harinandan-reddy closed 7 months ago

harinandan-reddy commented 8 months ago

com.slack.api.model.block.element.RichTextSectionElement.Broadcast does not have style property but the JSON in message for type "broadcast" has this property

                                {
                                    "type": "broadcast",
                                    "range": "here",
                                    "style": {
                                        "bold": true
                                    }
                                },

Reproducible in:

mvn dependency:tree | grep com.slack.api
gradle dependencies | grep com.slack.api
java -version
sw_vers && uname -v # or `ver`

The Slack SDK version

[INFO] +- com.slack.api:bolt:jar:1.24.0:compile [INFO] | +- com.slack.api:slack-api-model:jar:1.24.0:compile [INFO] | +- com.slack.api:slack-api-client:jar:1.24.0:compile [INFO] | - com.slack.api:slack-app-backend:jar:1.24.0:compile

Java Runtime version

openjdk version "11.0.21" 2023-10-17 LTS OpenJDK Runtime Environment Zulu11.68+17-CA (build 11.0.21+9-LTS) OpenJDK 64-Bit Server VM Zulu11.68+17-CA (build 11.0.21+9-LTS, mixed mode)

OS info

ProductName: macOS ProductVersion: 14.2.1 BuildVersion: 23C71 Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000

Steps to reproduce:

(Share the commands to run, source code, and project settings (e.g., pom.xml/build.gradle))

  1. Post a message where broadcast element has bold style
  2. Get message by the timestamp using postman
  3. Verify the "broadcast" type element in blocks contains style which is not available in SDK

Expected result:

com.slack.api.model.block.element.RichTextSectionElement.Broadcast should have style property

Actual result:

com.slack.api.model.block.element.RichTextSectionElement.Broadcast does not have style property

Requirements

Please make sure if this topic is specific to this SDK. For general questions/issues about Slack API platform or its server-side, could you submit questions at https://my.slack.com/help/requests/new instead. :bow:

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.

filmaj commented 7 months ago

Yes this is lacking today. The node.js type for this element, for example, extends from RichTextStyleable, which exposes the style property in node.js.

filmaj commented 7 months ago

I've created https://github.com/slackapi/java-slack-sdk/pull/1258 to address this but it will need a review from the primary maintainer of this project, who will be back from holidays next week.