Releases: slackapi/java-slack-sdk
version 1.23.1
Changes
- All issues/pull requests: https://github.com/slackapi/java-slack-sdk/milestone/63?closed=1
- All changes: v1.23.0...v1.23.1
version 1.23.0
Important Notice
Use say method with both text and blocks
Since this version, Bolt's say()
utility accepts both text
and blocks
at a time. When you pass blocks
to the method, it'd be recommended to add text
string too. At a glance, the text
value may look duplicated, but having it would be valuable for better user experience such as meaningful mobile notification message and accessibility support.
HTTP_PROXY / HTTPS_PROXY env variables are now used
Since this version, the default initialization of SlackConfig
tries to load HTTP_PROXY
/ HTTPS_PROXY
env variables, which are common practices to set the proxy server URL to use, if they exist. If you want to use a different proxy URL, you can set the URL using the setter methods.
OkHttp version 4.10
Since this version, this SDK uses OkHtttp 4.10 for HTTP requests. Although the version does not bring any big changes, its underlying Okio library has a major version upgrade. Refer to their release notes for details. If you find something unexpected since this version, please let us know in our GitHub issues.
Changes
- [bolt] #1002 Add an overloaded method that accepts both text and blocks to Say - Thanks @seratch
- [slack-api-client] #1003 Fix #992 Automatically resolve the proxy URL by HTTP_PROXY env variable - Thanks @seratch @amarinelli
- [slack-api-client] #1001 Fix #998 Upgrade okhttp version to 4.10 - Thanks @seratch
- [slack-api-cljent] #1000 Add unfurling capabilities to Webhook payload - Thanks @jazcarate
- [slack-api-client] #1004 Fix a bug where constructing
blocks
/attachments
etc. using anonymous inner class initialization - Thanks @WilliamBergamin - [slack-api-client] #1005 Fix a bug where the workflow step request builder has wrong null validation logic - Thanks @WilliamBergamin
- All issues/pull requests: https://github.com/slackapi/java-slack-sdk/milestone/58?closed=1
- All changes: v1.22.3...v1.23.0
version 1.22.3
Changes
- [slack-api-client] #997 Add cursor parameter to
reactions.list
API method - Thanks @seratch - [slack-api-client] #999 Fix a bug where DetailedLoggingListener does not print text request body - Thanks @seratch
@WilliamBergamin reported both of the above issues. Thanks a lot!
- All issues/pull requests: https://github.com/slackapi/java-slack-sdk/milestone/61?closed=1
- All changes: v1.22.2...v1.22.3
version 1.22.2
Changes
- [slack-api-model] #994 Add missing properties to ChannelDeletedEvent - Thanks @seratch
- Upgrade Kotlin version to 1.7 - Thanks @seratch
Document Updates
- #988 #989 Link getting started instructions for gradle to the gradle app quickstart - Thanks @filmaj
- #988 #990 Small improvements to the getting started documents for Bolt - Thanks @filmaj
- #991 Update Japanese documents to have #990 changes - Thanks @seratch
- All issues/pull requests: https://github.com/slackapi/java-slack-sdk/milestone/60?closed=1
- All changes: v1.22.1...v1.22.2
version 1.22.1
Changes
- [bolt] #984 Add granular user change events - Thanks @seratch
- [slack-api-client] #983 Tweaking warnings related to missing accessibility fields text and fallback when posting messages - Thanks @filmaj
- [slack-api-client] Add new properties to Audit Logs API response classes - Thanks @seratch
- All issues/pull requests: https://github.com/slackapi/java-slack-sdk/milestone/57?closed=1
- All changes: v1.22.0...v1.22.1
version 1.22.0
New Features
Message Metadata (Open Beta) Support
Message Metadata is a new feature in the Slack Platform, which enables developers to link a message inside Slack to a corresponding outside event or pattern.
With this Java SDK, you can post a message with metadata as below:
String token = System.getenv("SLACK_BOT_TOKEN");
MethodsClient client = Slack.getInstance().methods(token);
// Post a message with metadata
// You can set any type of data under the event_payload part
Map<String, Object> eventPayload = new HashMap<>();
eventPayload.put("procurement-id", "id-123");
eventPayload.put("amount", 1024);
eventPayload.put("tags", Arrays.asList("Procurement", "Engineering Division"));
// Build the metadata to attach to your app's message
Message.Metadata metadata = Message.Metadata.builder()
.eventType("internal-procurement-approval")
.eventPayload(eventPayload)
.build();
// Post a channel message with the metadata
ChatPostMessageResponse resposne = client.chatPostMessage(req -> req
.channel("#random")
.text("Can you approve this procurement process request?")
.metadata(metadata));
Once your app post a message with metadata, your app (and other apps too!) can access the message metadata by several ways:
- Fetch all the messages in a cannel by performaing
conversations.history
API calls with include_all_metadata argument - Subscribe to
message
events - Subscribe to
message_metadata_posted
,message_metadata_updated
,message_metadata_deleted
events
If you go with the message_metadata_* events, please don't forget having the following settings in your App Manifest:
settings:
event_subscriptions:
request_url: https://{your domain}/slack/events
bot_events:
- message_metadata_deleted
- message_metadata_posted
- message_metadata_updated
# Manually add this part in the App Manifest editor at https://api.slack.com/apps
metadata_subscriptions:
- app_id: "*"
event_type: internal-procurement-approval
Refer to the following test code and example for more details:
- Simple Bolt app that subscribes to the newly added events
- Test code performing the Web API calls with metadata
Changes
- [slack-api-cljent] #980 #979 #968 Message metadata beta support - Thanks @seratch
- [slack-api-client] #973 Upgrade tyrus 1.x to 1.18, lombok patch version, and optional ones - Thanks @seratch
- All issues/pull requests: https://github.com/slackapi/java-slack-sdk/milestone/51?closed=1
- All changes: v1.21.2...v1.22.0
version 1.21.2
Changes
- [bolt] #970 Fix #967 Attach
AppConfig#getSingleTeamToken()
toApp#client()
- Thanks @seratch - [slack-api-client] #964 Add
preview
tochat.unfurl
API parameters - Thanks @seratch @cathywise - [bolt-ktor] #969 Fix #966 Ktor incorrectly decoding event json with unicode symbols - Thanks @tg-dclarke
- [all] Upgrade patch/minor versions of optional dependencies - Thanks @seratch
- All issues/pull requests: https://github.com/slackapi/java-slack-sdk/milestone/55?closed=1
- All changes: v1.21.1...v1.21.2
version 1.21.1
Changes
- [bolt] #961 Fix #960 The bot refresh token is overridden with the user refresh token in OAuthV2DefaultSuccessHandler.java - Thanks @seratch
- All issues/pull requests: https://github.com/slackapi/java-slack-sdk/milestone/54?closed=1
- All changes: v1.21.0...v1.21.1
version 1.21.0
Changes
- [slack-api-client] #957 Fix #954 Add setToken(String) to MethodsClient request Interface - Thanks @seratch
- [slack-api-client] #958 Add domain to
team.info
API parameters - Thanks @seratch - [slack-api-client] #956 Fix #955 Add more Javadocs to slack-api-method classes and interfaces - Thanks @seratch
- [all] #959 Upgrade optional dependency patch/minor versions - Thanks @seratch
- All issues/pull requests: https://github.com/slackapi/java-slack-sdk/milestone/52?closed=1
- All changes: v1.20.2...v1.21.0
version 1.20.2
Changes
- [slack-api-client] #953 Add external_limited to conversations.inviteShared API parameters - Thanks @seratch
- [slack-api-model] Add Clip related properties to file object - Thanks @seratch
- [slack-api-client] Add new constant values to Audit Logs API client - Thanks @seratch
- All issues/pull requests: https://github.com/slackapi/java-slack-sdk/milestone/53?closed=1
- All changes: v1.20.1...v1.20.2