Skip to content

Commit c3e472a

Browse files
Apply suggestions from code review
Co-authored-by: Eden Zimbelman <eden.zimbelman@salesforce.com>
1 parent b964c92 commit c3e472a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

docs/english/web.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ You can have your app's messages stream in to replicate conventional AI chatbot
6161
* [`chat_appendStream`](/reference/methods/chat.appendstream)
6262
* [`chat_stopStream`](/reference/methods/chat.stopstream)
6363

64-
:::tip [The Python Slack SDK provides a [`chat_stream()`](https://docss.slack.dev/tools/python-slack-sdk/reference/web/client.html#slack_sdk.web.client.WebClient.chat_stream) helper utility to streamline calling these methods.]
64+
:::tip [The Python Slack SDK provides a [`chat_stream()`](/tools/python-slack-sdk/reference/web/client.html#slack_sdk.web.client.WebClient.chat_stream) helper utility to streamline calling these methods.]
6565

6666
See the [_Streaming messages_](/tools/bolt-python/concepts/message-sending#streaming-messages) section of the Bolt for Python docs for implementation instructions.
6767

@@ -75,12 +75,16 @@ First you need to begin the message stream:
7575
# Example: Stream a response to any message
7676
@app.message()
7777
def handle_message(message, client):
78-
channel_id = payload["channel"]
79-
thread_ts = payload["thread_ts"]
78+
channel_id = event.get("channel")
79+
team_id = event.get("team")
80+
thread_ts = event.get("thread_ts") or event.get("ts")
81+
user_id = event.get("user")
8082

8183
# Start a new message stream
8284
stream_response = client.chat_startStream(
8385
channel=channel_id,
86+
recipient_team_id=team_id,
87+
recipient_user_id=user_id,
8488
thread_ts=thread_ts,
8589
)
8690
stream_ts = stream_response["ts"]
@@ -117,7 +121,7 @@ Your app can then end the stream with the `chat_stopStream` method:
117121
)
118122
```
119123

120-
The method also provides you an opportunity to request user feedback on your app's responses using the [feedback buttons](/reference/block-kit/block-elements/feedback-buttons-element) block element within the [context actions](/reference/block-kit/blocks/context-actions-block) block. The user will be presented with thumbs up and thumbs down buttons.
124+
The method also provides you an opportunity to request user feedback on your app's responses using the [feedback buttons](/reference/block-kit/block-elements/feedback-buttons-element) block element within the [context actions](/reference/block-kit/blocks/context-actions-block) block. The user will be presented with thumbs up and thumbs down buttons which send an action to your app when pressed.
121125

122126
```python
123127
def create_feedback_block() -> List[Block]:

0 commit comments

Comments
 (0)