Releases: slackapi/java-slack-sdk
version 1.28.0
Changes
- [all] #1119 Upgrade Lombok/Kotlin patch versions (and optional others too) - Thanks @seratch
- [bolt] #1126 Add thread_ts parameter to response_url sender inputs - Thanks @seratch
- [slack-api-client] #1117 Fix #1082 Add admin.roles.{list|add|remove}Assignments API supports - Thanks @seratch
- [slack-api-client] #1123 Fix #1122 A request toward an invalid webhook URL get 200 OK response (expected: 302 redirection) - Thanks @tsasaki609 @seratch
- [docs] #1116 #1118 Fix document errors - Thanks @JonGilmore
- All issues/pull requests: https://github.com/slackapi/java-slack-sdk/milestone/72?closed=1
- All changes: v1.27.3...v1.28.0
version 1.27.3
Changes
- [slack-api-client] #1106 Fix #821
emoji.list
missinginclude_categories
option - Thanks @slushpupie @seratch - [all] #1107 Upgrade gson, kotlin, and so on - Thanks @seratch
- [slack-api-model] Add
media_progress
property infile
objects - Thanks @seratch - [slack-api-client] Add
team_id
toadmin.analytics.getFile
API response data - Thanks @seratch
- All issues/pull requests: https://github.com/slackapi/java-slack-sdk/milestone/74?closed=1
- All changes: v1.27.2...v1.27.3
version 1.27.2
Changes
- [slack-api-client] #1089 Fix #1088 Update MethodsClient to be consistent on the text field warnings with Node / Python SDKs - Thanks @seratch
- [slack-api-client] #1090 Fix #1087 Add admin.conversations.bulk{Archive|Delete|Move} API method support - Thanks @seratch
- [bolt] #1097 Fix #1092 by reducing info level logging in AmazonS3InstallationService/AmazonS3OAuthStateService - Thanks @seratch
- [document] #1096 Update Spring Boot documents and examples to support v3 - Thanks @seratch
- All issues/pull requests: https://github.com/slackapi/java-slack-sdk/milestone/73?closed=1
- All changes: v1.27.1...v1.27.2
version 1.27.1
Changes
- [bolt] #1086 Fix #1084 by enabling app.message method to manage multiple handlers - Thanks @Arxing @seratch
- [document] #1083 Adjust the code snippets in slack-api-client documents - Thanks @SotaNakajima
- All issues/pull requests: https://github.com/slackapi/java-slack-sdk/milestone/71?closed=1
- All changes: v1.27.0...v1.27.1
version 1.27.0
Changes
- [slack-api-model] #1076 Add datetimepicker, url, email, number block elements - Thanks @seratch
- [slack-api-client] #1081 Add requestFileInfo param to MethodsClient#filesUploadV2 method - Thanks @seratch
- [all] #1077 Upgrade GSON and other optional dependencies - Thanks @seratch
- [project] #1079 Removed deprecated CodCov script - Thanks @WilliamBergamin
- [documents] #1073 Resolve minor typos for ExecutorService - Thanks @jasonoh
- All issues/pull requests: https://github.com/slackapi/java-slack-sdk/milestone/67?closed=1
- All changes: v1.26.1...v1.27.0
version 1.26.1
Changes
- [slack-api-client] #1068 Fix context.teamId for view interactions in a Slack Connect channel - Thanks @seratch
- All issues/pull requests: https://github.com/slackapi/java-slack-sdk/milestone/69?closed=1
- All changes: v1.26.0...v1.26.1
version 1.26.0
Announcements
files.upload v2
We've received many reports on the performance issue of the existing files.upload
API. So, to cope with the problem, our platform team decided to unlock a new way to upload files to Slack via public APIs. To utilize the new approach, developers need to implement the following steps on their code side:
- Call
MethodsClient#filesGetUploadURLExternal()
method to receive a URL to use for each file - Perform an HTTP POST request to the URL you received in step 1 for each file
- Call
MethodsClient#filesCompleteUploadExternal()
method with the pairs of file ID and title to complete the whole process, plus share the files in a channel - If you need the full metadata of the files, call
MethodsClient#filesInfo()
method for each file
We do understand that writing the above code requires many lines of code. Also, the existing MethodsClient#filesUpload()
users have to take a certain amount of time for migration. To mitigate the pain, we've added a wrapper method named MethodsClient#filesUploadV2()
on the SDK side.
Also, in addition to the performance improvements, another good news is that 3rd party apps can now upload multiple files at a time!
See the following code examples demonstrating how the wrapper method works:
import com.slack.api.Slack;
import com.slack.api.methods.request.files.FilesUploadV2Request;
import com.slack.api.methods.response.files.FilesUploadResponse;
import com.slack.api.methods.response.files.FilesUploadV2Response;
import java.util.Arrays;
import java.util.List;
Slack slack = Slack.getInstance();
String token = System.getenv("SLACK_BOT_TOKEN");
// Legacy files.upload code example
FilesUploadResponse legacyResponse = slack.methods(token).filesUpload(r -> r
.file(new java.io.File("./logo.png"))
.filename("logo.png")
.title("Company Logo")
.channels(Arrays.asList("C123456"))
.initialComment("Here is the latest version of our company logo!")
);
com.slack.api.model.File legacyFile = legacyResponse.getFile();
// V2 wrapper is mostly the same!
FilesUploadV2Response v2Response = slack.methods(token).filesUploadV2(r -> r
.file(new java.io.File("./logo.png"))
.filename("logo.png")
.title("Company Logo")
.channel("C123456") // sharing a file in multiple channels is no longer supported
.initialComment("Here is the latest version of our company logo!")
);
com.slack.api.model.File v2File = v2Response.getFile();
// Now you can upload multiple files at a time!
FilesUploadV2Response v2MultiFilesResponse = slack.methods(token).filesUploadV2(r -> r
.fileUploads(Arrays.asList(
FilesUploadV2Request.FileUpload.builder()
.file(new java.io.File("./logo.png"))
.filename("logo.png")
.title("Company Logo")
.build(),
FilesUploadV2Request.FileUpload.builder()
.file(new java.io.File("./2022-03-01-meeting-minutes.md"))
.filename("2022-03-01-meeting-minutes.md")
.title("2022-03-01 Meeting Minutes")
.snippetType("text")
.build()
))
.channel("C123456")
.initialComment("Here are the files I mentioned in the meeting :wave:")
);
List<com.slack.api.model.File> v2Files = v2MultiFilesResponse.getFiles();
When migrating to the v2 method, please note that the new method requires both UPDATE: When you use v1.34.0 or newer, the method returns full file metadata without files:write
and files:read
scopes. If your existing apps have only files:write
scope for uploading files, you need to add files:read
to the scopes plus re-install the app to issue an updated token.files:read
scope.
Slack#close() method now terminates underlying thread pools.
Since this version, Slack
instances are compatible with AutoCloseable
interface. The Slack#close()
method safely terminates its underlying thread pools managed by SlackConfig
instance. This can be beneficial especially for resource intensive apps.
Changes
- [slack-api-model] #1047 Add
share_shortcut
block support (for the new beta platform) - Thanks @seratch - [slack-api-client] #1065 Add
files.upload
v2 support - Thanks @seratch - [slack-api-client] #1063 Fix #1061 Add message metadata support for response_url / Incoming Webhooks calls - Thanks @baole
- [slack-api-client] #1064 Fix #1060 Enable
Slack#close()
method to shutdown thread pools behind itsSlackConfig
- Thanks @seratch @CarlosMOGoncalves - [slack-api-client] #1059 Fix #1058 Add
include_all_metadata
toconversations.replies
arguments - Thanks @scarytom - [bolt] #1051 Fix NPE when initializing
App
's status in 3-args constructor - Thanks @musketyr - [bolt-micronaut] #1049 Fix #1048 bolt-micronaut does not support the OAuth flow - Thanks @musketyr
- [bolt-micronaut] #1053 Fix #1052 CommandsTest for Bolt Micronaut does not work - Thanks @musketyr
- All issues/pull requests: https://github.com/slackapi/java-slack-sdk/milestone/68?closed=1
- All changes: v1.25.1...v1.26.0
version 1.25.1
Changes
- All issues/pull requests: https://github.com/slackapi/java-slack-sdk/milestone/66?closed=1
- All changes: v1.25.0...v1.25.1
version 1.25.0
Changes
- [slack-api-client] #1039 Fix #1038
BlockActionPayload
is missingapp_unfurl
information - Thanks @seratch @kfmartin - [slack-api-model] #1030 Fix #1029
RichTextListElement
have does not haveborder
andoffset
fields - Thanks @seratch @harinandan-reddy - [all] #1031 Upgrade gson patch version and other optional ones - Thanks @seratch
- [bolt-servlet] #1026 #1027 Upgrade jetty dependancies due to CVE-2022-2048 and CVE-2022-2047 - Thanks @seratch @otlg
- [bolt] #1033 Upgrade ktor/http4k minor versions - Thanks @seratch
- [bolt] #1025 Improved readability of tests - Thanks @WilliamBergamin
Document Changes
- #1024 Fix typos in javadoc, comments and documentations Updates - Thanks @marcwrobel
- #1037 #1036 The filetype API method doc has an unformated/invalid link to file types - Thanks @filmaj
- All issues/pull requests: https://github.com/slackapi/java-slack-sdk/milestone/65?closed=1
- All changes: v1.24.0...v1.25.0
version 1.24.0
Announcements
Embedding videos in Block Kit
Block Kit now supports embedding a video in any surface areas. Check the document and example code:
- https://api.slack.com/reference/block-kit/blocks#video
- https://github.com/slackapi/java-slack-sdk/blob/v1.24.0/slack-api-client/src/test/java/test_with_remote_apis/methods/chat_Test.java#L949-L969
bolt-ktor is now compatible with Ktor 2 or newer
Since this version, bolt-ktor module supports only Ktor 2.x. Refer to Ktor team's announcement and migration guide for more details:
Changes
- [slack-api-model] #1020 #1019 Add video block to Block Kit support - Thanks @seratch
- [slack-api-client] #1014 Fix #1013 Update tyrus-standalone-client dependency from 1.18 to 1.19 - Thanks @seratch
- [bolt-servlet] #1022 #1021 bolt-servlet improperly returns 200 OK with empty string to invalid requests - Thanks @seratch
- [bolt-ktor] #1018 #981 Migrate to Ktor v2 (bolt-ktor) - Thanks @WilliamBergamin
- [bolt-aws-lambda] #1016 #1015 Lambda handler class doesn't account for base64 encoded body - Thanks @seratch @harshal-dupare
Document Changes
- Updates tyrus-standalone-client version from 1.17 to 1.19 in the documentations - Thanks @marcwrobel
- All issues/pull requests: https://github.com/slackapi/java-slack-sdk/milestone/59?closed=1
- All changes: v1.23.1...v1.24.0