openclaw/src/slack
David Szarzynski bbcb3ac6e0
fix(slack): pass recipient_team_id to streaming API calls (#20988)
* fix(slack): pass recipient_team_id and recipient_user_id to streaming API calls

The Slack Agents & AI Apps streaming API (chat.startStream / chat.stopStream)
requires recipient_team_id and recipient_user_id parameters. Without them,
stopStream fails with 'missing_recipient_team_id' (all contexts) or
'missing_recipient_user_id' (DM contexts), causing streamed messages to
disappear after generation completes.

This passes:
- team_id (from auth.test at provider startup, stored in monitor context)
- user_id (from the incoming message sender, for DM recipient identification)

through to the ChatStreamer via recipient_team_id and recipient_user_id options.

Fixes #19839, #20847, #20299, #19791, #20337

AI-assisted: Written with Claude (Opus 4.6) via OpenClaw. Lightly tested
(unit tests pass, live workspace verification in progress).

* fix(slack): disable block streaming when native streaming is active

When Slack native streaming (`chat.startStream`/`stopStream`) is enabled,
`disableBlockStreaming` was set to `false`, which activated the app-level
block streaming pipeline. This pipeline intercepted agent output, sent it
via block replies, then dropped the final payloads that would have flowed
through `deliverWithStreaming` to the Slack streaming API — resulting in
zero replies delivered.

Set `disableBlockStreaming: true` when native streaming is active so the
final reply flows through the Slack streaming API path as intended.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-02-19 14:44:34 -08:00
..
http chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
monitor fix(slack): pass recipient_team_id to streaming API calls (#20988) 2026-02-19 14:44:34 -08:00
accounts.ts style: align formatting with oxfmt 0.33 2026-02-18 01:34:35 +00:00
actions.blocks.test.ts test(slack): dedupe block and draft stream test fixtures 2026-02-18 12:57:51 +00:00
actions.read.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
actions.ts Slack: add media block fallback text handling 2026-02-16 23:51:44 +01:00
blocks-fallback.test.ts Slack: add media block fallback text handling 2026-02-16 23:51:44 +01:00
blocks-fallback.ts Slack: add media block fallback text handling 2026-02-16 23:51:44 +01:00
blocks-input.test.ts Slack: validate blocks input shape centrally 2026-02-16 23:51:44 +01:00
blocks-input.ts Slack: validate runtime blocks in send and edit paths 2026-02-16 23:51:44 +01:00
blocks.test-helpers.ts test(slack): dedupe block and draft stream test fixtures 2026-02-18 12:57:51 +00:00
channel-migration.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
channel-migration.ts chore: Enable "curly" rule to avoid single-statement if confusion/errors. 2026-01-31 16:19:20 +09:00
client.test.ts fix: reduce Slack WebClient retries 2026-01-23 06:31:53 +00:00
client.ts fix: reduce Slack WebClient retries 2026-01-23 06:31:53 +00:00
directory-live.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
draft-stream.test.ts test(slack): type draft stream harness callbacks 2026-02-18 13:02:59 +00:00
draft-stream.ts refactor(channels): share draft stream loop across slack and telegram 2026-02-16 23:48:43 +00:00
format.test.ts fix(signal): outbound formatting and markdown IR rendering improvements (#9781) 2026-02-14 16:57:20 +01:00
format.ts refactor(slack): share markdown render options 2026-02-18 18:33:48 +00:00
index.ts feat: add slack multi-account routing 2026-01-08 08:49:16 +01:00
message-actions.ts style: align formatting with oxfmt 0.33 2026-02-18 01:34:35 +00:00
modal-metadata.test.ts Slack: add modal private metadata utilities 2026-02-16 23:51:44 +01:00
modal-metadata.ts Slack: add modal private metadata utilities 2026-02-16 23:51:44 +01:00
monitor.test-helpers.ts test: dedupe slack missing-thread tests and cover history failures 2026-02-18 05:31:06 +00:00
monitor.test.ts perf(test): fake abort timer and dedupe slack thread cases 2026-02-18 16:14:07 +00:00
monitor.threading.missing-thread-ts.test.ts test: dedupe slack missing-thread tests and cover history failures 2026-02-18 05:31:06 +00:00
monitor.tool-result.test.ts test(cli): dedupe repeated gateway node and slack pairing setup 2026-02-18 13:34:03 +00:00
monitor.ts refactor: prune room legacy 2026-01-17 07:41:24 +00:00
probe.ts refactor(probe): share withTimeout 2026-02-16 00:39:11 +00:00
resolve-channels.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
resolve-channels.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
resolve-users.ts refactor(slack): dedupe allowlist match selection 2026-02-15 05:57:11 +00:00
scopes.ts refactor: centralize isPlainObject, isRecord, isErrno, isLoopbackHost utilities (#12926) 2026-02-09 17:02:55 -08:00
send.blocks.test.ts test(slack): dedupe block and draft stream test fixtures 2026-02-18 12:57:51 +00:00
send.ts style: align formatting with oxfmt 0.33 2026-02-18 01:34:35 +00:00
stream-mode.test.ts feat(slack): add configurable stream modes 2026-02-16 23:50:42 +01:00
stream-mode.ts feat(slack): add configurable stream modes 2026-02-16 23:50:42 +01:00
streaming.ts fix(slack): pass recipient_team_id to streaming API calls (#20988) 2026-02-19 14:44:34 -08:00
targets.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
targets.ts refactor(channels): share prefixed target parsing 2026-02-17 00:32:34 +00:00
threading-tool-context.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
threading-tool-context.ts refactor: rename to openclaw 2026-01-30 03:16:21 +01:00
threading.test.ts chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts. 2026-02-01 10:03:47 +09:00
threading.ts refactor: unify threading contexts 2026-01-21 20:35:12 +00:00
token.ts
types.ts fix(slack): extract text and media from forwarded message attachments 2026-02-16 23:55:34 +01:00