From a2f0d92ba446be91d47946ffb10dc6afd0e8c39e Mon Sep 17 00:00:00 2001 From: ykaliukh Date: Fri, 10 May 2024 13:53:36 +0300 Subject: [PATCH 1/5] deprecate uploadFile method --- .../src/main/java/com/hubspot/slack/client/SlackClient.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/slack-java-client/src/main/java/com/hubspot/slack/client/SlackClient.java b/slack-java-client/src/main/java/com/hubspot/slack/client/SlackClient.java index c898c9fd..a6db884d 100644 --- a/slack-java-client/src/main/java/com/hubspot/slack/client/SlackClient.java +++ b/slack-java-client/src/main/java/com/hubspot/slack/client/SlackClient.java @@ -392,6 +392,12 @@ CompletableFuture> addReaction( CompletableFuture> getTeamInfo(); // files + /** + * This method is being sunset on March 11, 2025 + * @deprecated use {@link #getUploadURLExternal(GetUploadUrlExternalParams)} and {@link #completeUploadExternal(CompleteUploadExternalParams)} + * @see Sunset details + */ + @Deprecated CompletableFuture> uploadFile( FilesUploadParams params ); From 6943f100c16e5f2a7ce5c259136a4faca73cd3d3 Mon Sep 17 00:00:00 2001 From: ykaliukh Date: Fri, 10 May 2024 13:54:31 +0300 Subject: [PATCH 2/5] delete unused import --- .../src/main/java/com/hubspot/slack/client/SlackClient.java | 1 - 1 file changed, 1 deletion(-) diff --git a/slack-java-client/src/main/java/com/hubspot/slack/client/SlackClient.java b/slack-java-client/src/main/java/com/hubspot/slack/client/SlackClient.java index a6db884d..3a222b97 100644 --- a/slack-java-client/src/main/java/com/hubspot/slack/client/SlackClient.java +++ b/slack-java-client/src/main/java/com/hubspot/slack/client/SlackClient.java @@ -120,7 +120,6 @@ import com.hubspot.slack.client.models.response.dnd.DndSnoozeResponse; import com.hubspot.slack.client.models.response.emoji.EmojiListResponse; import com.hubspot.slack.client.models.response.files.CompleteUploadExternalResponse; -import com.hubspot.slack.client.models.response.files.CompleteUploadExternalResponseIF; import com.hubspot.slack.client.models.response.files.FilesSharedPublicUrlResponse; import com.hubspot.slack.client.models.response.files.FilesUploadResponse; import com.hubspot.slack.client.models.response.files.GetUploadUrlExternalResponse; From 8d58215fd137b1614c9656ca7772ef9f85a31eab Mon Sep 17 00:00:00 2001 From: ykaliukh Date: Fri, 10 May 2024 13:58:03 +0300 Subject: [PATCH 3/5] add new methods to README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 08e28457..a85af51d 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,8 @@ We currently support: - dialog.open #### files - files.upload + - files.getUploadURLExternal + - files.completeUploadExternal - files.sharedPublicURL #### groups - groups.kick (kickUserFromGroup) From bbc343baa57beba2bb9c353c0f9795480114084e Mon Sep 17 00:00:00 2001 From: ykaliukh Date: Fri, 10 May 2024 14:01:55 +0300 Subject: [PATCH 4/5] add a notice --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a85af51d..a1e90bf9 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,8 @@ An asychronous HTTP client wrapping Slack's [RPC-style web api](https://api.slac **NOTICE:** +The original web API method for uploading files to Slack, `files.upload`, is being sunset on March 11, 2025. [See details](https://api.slack.com/changelog/2024-04-a-better-way-to-upload-files-is-here-to-stay) + On October 18th 2019, Slack will stop supporting the `replies` thread on a `Message` returned from the [`conversations.replies` endpoint](https://api.slack.com/methods/conversations.replies) as well as any places that use `LiteMessage`. Due to this, we are deprecating `getReplies()` on [`LiteMessage`](https://github.com/HubSpot/slack-client/blob/master/slack-base/src/main/java/com/hubspot/slack/client/models/LiteMessageIF.java) From c13af6796ef08e2f3917ef9bc0ae68d64d4a6025 Mon Sep 17 00:00:00 2001 From: ykaliukh Date: Fri, 10 May 2024 14:24:50 +0300 Subject: [PATCH 5/5] run formatter --- .../src/main/java/com/hubspot/slack/client/SlackClient.java | 1 + 1 file changed, 1 insertion(+) diff --git a/slack-java-client/src/main/java/com/hubspot/slack/client/SlackClient.java b/slack-java-client/src/main/java/com/hubspot/slack/client/SlackClient.java index 3a222b97..0332b4a7 100644 --- a/slack-java-client/src/main/java/com/hubspot/slack/client/SlackClient.java +++ b/slack-java-client/src/main/java/com/hubspot/slack/client/SlackClient.java @@ -400,6 +400,7 @@ CompletableFuture> addReaction( CompletableFuture> uploadFile( FilesUploadParams params ); + CompletableFuture> getUploadURLExternal( GetUploadUrlExternalParams params );