Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(slack): Does not send plain text with documents (#7079)
(cherry picked from commit 1c68a9d)
  • Loading branch information
ztefanie authored and github-actions[bot] committed May 19, 2026
commit 7f075aa1c4346a230c5f5e0b2003c240c984eff4
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ public SlackResponse invoke(MethodsClient methodsClient) throws IOException, Sla
if (documents != null && !documents.isEmpty()) {
requestBuilder.blocks(
BlockBuilder.create(new FileUploader(methodsClient))
.text(text)
.documents(documents)
.getLayoutBlocks());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ void invoke_WhenTextIsGiven_ShouldInvoke() throws SlackApiException, IOException
ChatPostMessageRequest value = chatPostMessageRequest.getValue();
assertThat(value.getChannel()).isEqualTo(USERID);
assertThat(value.isLinkNames()).isTrue();
assertThat(value.getText()).isEqualTo("test");
assertThat(value.getBlocks())
.anyMatch(block -> block instanceof com.slack.api.model.block.SectionBlock)
.anyMatch(block -> block instanceof com.slack.api.model.block.FileBlock);
}
}

Expand Down
Loading