Skip to content

Conversation

@srtaalej
Copy link
Contributor

@srtaalej srtaalej commented Dec 22, 2025

This PR adds a helper to the chat streaming methods

ChatStreamHelper stream = (req -> req.
    .channel("C0123456789")
    .threadTs("1700000001.123456")
    .recipientTeamId("T0123456789")
    .recipientUserId("U0123456789")
    .bufferSize(100));
stream.append("**hello wo");
stream.append("rld!**");
ChatStopStreamResponse response = stream.stop();

Category (place an x in each of the [ ])

  • bolt (Bolt for Java)
  • bolt-{sub modules} (Bolt for Java - optional modules)
  • slack-api-client (Slack API Clients)
  • slack-api-model (Slack API Data Models)
  • slack-api-*-kotlin-extension (Kotlin Extensions for Slack API Clients)
  • slack-app-backend (The primitive layer of Bolt for Java)

Requirements

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

@srtaalej srtaalej added this to the 1.47.0 milestone Dec 22, 2025
@srtaalej srtaalej self-assigned this Dec 22, 2025
@srtaalej srtaalej added the enhancement M-T: A feature request for new functionality label Dec 22, 2025
@codecov
Copy link

codecov bot commented Dec 22, 2025

Codecov Report

❌ Patch coverage is 75.14451% with 43 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.43%. Comparing base (f48758d) to head (beb1b92).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...a/com/slack/api/methods/AsyncChatStreamHelper.java 71.59% 21 Missing and 4 partials ⚠️
...n/java/com/slack/api/methods/ChatStreamHelper.java 79.22% 12 Missing and 4 partials ⚠️
...om/slack/api/methods/SlackChatStreamException.java 66.66% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1545      +/-   ##
============================================
+ Coverage     73.32%   73.43%   +0.10%     
- Complexity     4515     4549      +34     
============================================
  Files           477      480       +3     
  Lines         14274    14447     +173     
  Branches       1487     1498      +11     
============================================
+ Hits          10467    10609     +142     
- Misses         2917     2941      +24     
- Partials        890      897       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@srtaalej srtaalej marked this pull request as ready for review December 22, 2025 19:21
@srtaalej srtaalej requested a review from a team as a code owner December 22, 2025 19:21
Copy link
Member

@zimeg zimeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srtaalej This is awesome to review and test! Thanks for putting it together 👾 ✨

I'm leaving a few comments around how we might surface this for the web client that might make it easier to use in calling code, similar to other SDKs, but please let me know if language limits these idea 🙏

Comment on lines 28 to 36
* MethodsClient client = Slack.getInstance().methods(token);
* ChatStreamHelper stream = ChatStreamHelper.builder()
* .client(client)
* .channel("C0123456789")
* .threadTs("1700000001.123456")
* .recipientTeamId("T0123456789")
* .recipientUserId("U0123456789")
* .bufferSize(100)
* .build();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👁️‍🗨️ thought: This works well but I'm wondering if it's possible to attach the chat stream helper to the client for an implementation similar to files upload?

String token = System.getenv("SLACK_BOT_TOKEN");
var client = Slack.getInstance().methods(token);
client.filesUploadV2(req -> req.content("greetings!").channel("C01223456789"));

Comment on lines +223 to +229
// Create a response object to return (mimicking the append response structure)
response = new ChatAppendStreamResponse();
response.setOk(startResponse.isOk());
response.setChannel(startResponse.getChannel());
response.setTs(startResponse.getTs());
response.setWarning(startResponse.getWarning());
response.setError(startResponse.getError());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⭐ praise: Nice! I forget if casting between related types might also work here but I think the explicit setting is most clear.

srtaalej and others added 7 commits January 14, 2026 13:26
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.0 to 6.0.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@1af3b93...8e8c483)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](actions/setup-java@dded088...f2beeb2)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-version: 5.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.5.1 to 5.5.2.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@5a10915...671740a)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-version: 5.5.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [actions/stale](https://github.com/actions/stale) from 10.1.0 to 10.1.1.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](actions/stale@5f858e3...9971854)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-version: 10.1.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@srtaalej srtaalej requested a review from zimeg January 14, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement M-T: A feature request for new functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants