Skip to content

feat(web-api): add recipient_team_id and recipient_user_id to chat_startStream method - #1751

Merged
mwbrooks merged 2 commits into
ai-appsfrom
mbrooks-ai-apps-recipient-attr
Sep 24, 2025
Merged

feat(web-api): add recipient_team_id and recipient_user_id to chat_startStream method#1751
mwbrooks merged 2 commits into
ai-appsfrom
mbrooks-ai-apps-recipient-attr

Conversation

@mwbrooks

Copy link
Copy Markdown
Member

Summary

This pull request add 2 optional types to the chat_startStream method:

  • recipient_team_id is an optional Team ID that is required when recipient_user_id exists
  • recipient_user_id is an optional User ID that is required when recipient_team_id exists

The developer must provide these optional params when starting a conversation stream outside of a DM.

Testing

  • Added coverage tests

Category

  • slack_sdk.web.WebClient (sync/async) (Web API client)
  • slack_sdk.webhook.WebhookClient (sync/async) (Incoming Webhook, response_url sender)
  • slack_sdk.socket_mode (Socket Mode client)
  • slack_sdk.signature (Request Signature Verifier)
  • slack_sdk.oauth (OAuth Flow Utilities)
  • slack_sdk.models (UI component builders)
  • slack_sdk.scim (SCIM API client)
  • slack_sdk.audit_logs (Audit Logs API client)
  • slack_sdk.rtm_v2 (RTM client)
  • /docs (Documents)
  • /tutorial (PythOnBoardingBot tutorial)
  • tests/integration_tests (Automated tests for this library)

Requirements

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh after making the changes.

@codecov

codecovBot commented Sep 23, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (ai-apps@d335831). Learn more about missing BASE report.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@ Coverage Diff @@## ai-apps #1751 +/- ##
==========================================
Coverage ? 85.01% ==========================================
Files ? 113 Lines ? 12955 Branches ? 0 ==========================================
Hits ? 11014 Misses ? 1941 Partials ? 0 

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

@zimegzimeg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@mwbrooks LGTM! And thanks for the super fast follow here.

I like that you included generated reference to keep commits contained, but I did leave one comment on perhaps an prior oversight? I forget what was here before 📠

When you're feeling like the time is right we should merge this for another prerelease 🌚 ✨

<dt id="slack_sdk.oauth.installation_store.file.FileInstallationStore"><code class="flex name class">
<span>class <span class="ident">FileInstallationStore</span></span>
<span>(</span><span>*,<br>base_dir: str = '/Users/eden.zimbelman/.bolt-app-installation',<br>historical_data_enabled: bool = True,<br>client_id: str | None = None,<br>logger: logging.Logger = &lt;Logger slack_sdk.oauth.installation_store.file (WARNING)&gt;)</span>
<span>(</span><span>*,<br>base_dir: str = '/Users/michael.brooks/.bolt-app-installation',<br>historical_data_enabled: bool = True,<br>client_id: str | None = None,<br>logger: logging.Logger = &lt;Logger slack_sdk.oauth.installation_store.file (WARNING)&gt;)</span>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🤖 suggestion(non-blocking): Hmm I didn't notice this in a past change, but I am wondering if we can use a $HOME placeholder here instead?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Good catch!

Digging into it, it's been around a year ago during Aug 2024 and it dates back to 3 year ago when v3.16.2 introduced the user paths..

I like your suggestion of replacing it with a placeholder. Let's create an issue to handle it in another PR.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Created #1752

await async_method()
elif method_name == "chat_startStream":
self.api_methods_to_call.remove(method(channel="C123")["method"])
method(channel="C123", recipient_team_id="T123", recipient_user_id="U123")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

⭐ praise: Thank you for enhancing tests with this change!

@mwbrooks
mwbrooks merged commit 12335da into ai-appsSep 24, 2025
12 checks passed
@mwbrooks
mwbrooks deleted the mbrooks-ai-apps-recipient-attr branch September 24, 2025 02:41
@mwbrooks

Copy link
Copy Markdown
MemberAuthor

Thanks for the quick review @zimeg! We can tackle the docs fix after this work, but it's a very good find!

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:asyncenhancementM-T: A feature request for new functionalitysemver:minorVersion: 3xweb-client

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@mwbrooks@zimeg