Skip to content

feat: add authorship arguments to assistant threads and chat stream#1862

Open
zimeg wants to merge 2 commits intomainfrom
zimeg-feat-web-api-authorship-args
Open

feat: add authorship arguments to assistant threads and chat stream#1862
zimeg wants to merge 2 commits intomainfrom
zimeg-feat-web-api-authorship-args

Conversation

@zimeg
Copy link
Copy Markdown
Member

@zimeg zimeg commented Apr 27, 2026

Summary

This pull request adds authorship arguments (icon_emoji, icon_url, username) to the assistant.threads.setStatus and chat.startStream Web API methods.

Mirrors slackapi/node-slack-sdk#2455 for the Python SDK.

Testing

Try the following snippet against an assistant thread:

import time

client.assistant_threads_setStatus(
    channel_id="C018QLSQ38A",
    thread_ts="1765934795.222209",
    status="dancing...",
    username="Charlie Brown",
    icon_emoji="maple_leaf",
)

time.sleep(4)

response = client.chat_startStream(
    channel="C018QLSQ38A",
    thread_ts="1765934795.222209",
    recipient_team_id="T07L2FPUY",
    recipient_user_id="U0187GKV2US",
    username="Charlie Brown",
    icon_emoji="maple_leaf",
)

time.sleep(2)

client.chat_appendStream(
    channel="C018QLSQ38A",
    ts=response["ts"],
    markdown_text="Dancing with snoopy dog.",
)

time.sleep(2)

client.chat_stopStream(
    channel="C018QLSQ38A",
    ts=response["ts"],
)

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.

Add `icon_emoji`, `icon_url`, and `username` parameters to the
`assistant.threads.setStatus` and `chat.startStream` Web API methods.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg zimeg requested a review from a team as a code owner April 27, 2026 20:58
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.98%. Comparing base (9435412) to head (76fd2bb).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1862      +/-   ##
==========================================
- Coverage   84.01%   83.98%   -0.04%     
==========================================
  Files         117      117              
  Lines       13256    13256              
==========================================
- Hits        11137    11133       -4     
- Misses       2119     2123       +4     

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

@zimeg zimeg added enhancement M-T: A feature request for new functionality web-client semver:patch labels Apr 27, 2026
@zimeg zimeg added this to the 3.41.1 milestone Apr 27, 2026
@zimeg zimeg enabled auto-merge (squash) April 27, 2026 21:18
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 semver:patch web-client

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chat_stream ignores username and icon_url override parameters (works in chat_postMessage)

1 participant