Skip to content

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

Merged
zimeg merged 4 commits into
mainfrom
zimeg-feat-web-api-authorship-args
May 4, 2026
Merged

feat: add authorship arguments to assistant threads and chat stream#1862
zimeg merged 4 commits into
mainfrom
zimeg-feat-web-api-authorship-args

Conversation

@zimeg

@zimegzimeg commented Apr 27, 2026

Copy link
Copy Markdown
Member

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:

importtimeclient.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"],
)
streamer=app.client.chat_stream(
channel="C07U19RTY90",
thread_ts="1777925328.173729",
recipient_user_id="U06MCF88LQY",
recipient_team_id="T06M2FAFCF3",
username="Charlie Brown",
icon_emoji="maple_leaf",
buffer_size=0,
)
streamer.append(markdown_text="Dancing with snoopy dog!")
time.sleep(2)
streamer.append(markdown_text=" Fun!")
streamer.stop()

Category

  • slack_sdk.web.WebClient (sync/async) (Web API client)
  • 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 ownerApril 27, 2026 20:58
@codecov

codecovBot commented Apr 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.00%. Comparing base (726538c) to head (c623822).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@ Coverage Diff @@## main #1862 +/- ##
==========================================
- Coverage 84.00% 84.00% -0.01% 
==========================================
Files 117 117 Lines 13257 13257 ==========================================
- Hits 11137 11136 -1 - Misses 2120 2121 +1 

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

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

@srtaalejsrtaalej left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great and working well for me ⭐ ⭐ ⭐

@zimeg
zimeg disabled auto-merge May 4, 2026 19:51
@zimeg

zimeg commented May 4, 2026

Copy link
Copy Markdown
MemberAuthor

@srtaalej Thanks so much for reviewing! I landed c623822 after reading the linked issue again to find that the included chat_stream helper requires these same arguments be defined for editor hints 🔍 ✨

The description has updated test steps if that's curious but I will plan to merge this soon otherwise 🚢

@zimeg
zimeg merged commit 60bd43d into mainMay 4, 2026
18 checks passed
@zimeg
zimeg deleted the zimeg-feat-web-api-authorship-args branch May 4, 2026 21:36
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancementM-T: A feature request for new functionalitysemver:patchweb-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)

2 participants

@zimeg@srtaalej