fix: keep the Slack question when someone who may not answer presses its button (#201371)
Root cause: `extensions/slack/src/monitor/events/interactions.block-actions.ts:76` (`respondEphemeral`) posted `{ text, response_type: "ephemeral" }` to the interaction's `response_url` without `replace_original: false`, so Slack applied the reply to the source message and the denial took the place of the question for everyone in the thread.
Fixes #201348
## What Problem This Solves
In a Slack channel where some members may talk to the agent but are not allowed to press its buttons, one denied press on a question made the question disappear. Everyone in the thread then saw only "You are not authorized to use this control.", the buttons were gone, and the agent run stayed blocked until an operator found and answered the question another way.
## User Impact
A denied button press now shows the existing denial text only to the person who pressed. The question and its buttons stay in the thread, so people who are allowed to answer still can. Other private button feedback ("Answer submitted.", approval results) no longer replaces the message it belongs to either. Who is allowed to press is unchanged.
## Why This Change Was Made
Slack's `response_url` replaces the source message unless `replace_original` is literally `false`. Slack's guide for interactive messages says: "Responding immediately with a JSON message body will replace the current message in its entirety by default. If you explicitly indicate that you want to create a new message instead, specify a literal false in the replace_original field", and its error-feedback example is `{"response_type": "ephemeral", "replace_original": false, ...}` ([docs](https://docs.slack.dev/legacy/legacy-messaging/legacy-making-messages-interactive)). The thread section of [Handling user interaction](https://docs.slack.dev/interactivity/handling-user-interaction/#publishing-responses-in-thread) warns the same: "be sure to set `replace_original` to `false` or you'll overwrite the message you're wanting to respond to!".
`respondEphemeral` is the one helper all private block-action feedback goes through; messages that are meant to change are updated separately through `chat.update`. Setting the flag there fixes the denial and every other private reply in one place. The denial check and its text are untouched.
## Evidence
- Built Gateway (`node dist/entry.js gateway run`, isolated profile) with the bundled Slack plugin in Socket Mode against a local Slack API, Socket Mode and `response_url` fixture, with a deterministic model that calls `ask_user`. Config matches the report: `groupPolicy: allowlist`, channel with `requireMention`, `allowFrom` = the operator. The operator mentions the bot in a channel thread, the agent posts "Allow ChatGPT to use Spotlight?" with Allow/Decline buttons, a channel member who is not on `allowFrom` presses Allow, then the operator presses Decline.
- main `7ce2d10eced5`: the Gateway logs the same drop line as the report (`reason=sender-not-allowlisted`); the denial is posted without `replace_original`; the question message now reads only "You are not authorized to use this control." with no buttons; the question stays pending and the run stays blocked.
- this PR: the denial is posted with `replace_original: false` and reaches only the member; the question and both buttons stay; the operator's press then answers it, the message shows "Answered: Decline", and the run resumes with that answer.
- control on main without the denied press: the operator's press resolves the question, but the "Answer submitted." reply then overwrites the finalized question in the same way.
- Observed proof lines: https://github.com/openclaw/openclaw/pull/201371#issuecomment-6987522374
- The fixture applies Slack's documented `response_url` rules above; a real Slack click needs a human Slack client, so the overwrite itself comes from Slack's docs and the reporter's API readback, not from a live click here.
- `extensions/slack/src/monitor/events/interactions.test.ts`: the private-reply assertion now requires `replace_original: false`; with this test, main fails 16 cases (including the denied block action and the typed question button) and this branch passes 59 of 59.
Thanks @shannon0430 for the detailed report and for pointing at the exact helper and Slack's guidance.
Merge danger: two-way door. One field added to Slack interaction replies; a revert restores the old payload. Blast radius: Slack block-action feedback only (denials, answer and approval acknowledgements); slash commands and message updates are unchanged.
Co-authored-by: Ayaan Zaidi <hi@obviy.us>
fix: keep the Slack question when someone who may not answer presses …
Find Your Interest
- Android Systrace 基础知识 - SystemServer 解读
- Android Service:开发自己的通知中心(2):辅助***实战
- Android 应用启动优化 - 一种 DelayLoad 的实现和原理(上篇)
- The Sentry Android SDK is now 20-30% faster!
- Android Tools - Log2File
- Android Service:开发自己的通知中心(1):辅助***介绍
- Android 无障碍服务导致的整机卡顿案例分析
- Android Perfetto 系列 15:Boot Trace、长时间现场 Trace 与偶发问题抓取
- Android 应用启动优化:一种 DelayLoad 的实现和原理(下篇)
- Integrating in-app-reviews with Trusted Web Activity





