-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
fix(slack): emit message_sent hook on outbound delivery (mirror Telegram) #89942
Copy link
Copy link
Closed
Closed
Copy link
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Summary
@openclaw/slackdoes not emit the documentedmessage_sentplugin hookafter a successful outbound Slack delivery, even though the hook is
contracted as observation-only for all outbound paths
(
docs/plugins/hooks.md).A plugin that registers
api.on("message_sent", …)receives notificationsfor outbound Telegram messages (Telegram fires
runMessageSentdirectly inextensions/telegram/src/bot/delivery.replies.ts) but never for Slack.Versions
openclaw2026.5.28@openclaw/slack2026.5.28Steps to reproduce (real behavior, no mocks)
[email protected]+@openclaw/[email protected].Configure the plugin with
plugins.entries.<id>.hooks.allowConversationAccess = true.Observed
The Slack message lands in the channel successfully; only
message_sentis silently missing.Root cause (analysis on latest
main)returns:
src/infra/outbound/deliver.ts— the deprecateddeliverOutboundPayloadsextensions/telegram/src/bot/delivery.replies.ts— Telegram fires it directlyextensions/slack/has zero references. The newsendDurableMessageBatchpath(
src/channels/message/send.ts) — which the migrated Slack adapter routes through —also does not call
runMessageSent. Telegram works only because it has its ownadapter-side emit; Slack was migrated to the unified pipeline in
05eda57b3c("refactor: migrate bundled plugins to message lifecycle") without adding the
equivalent
message_sentemission.Impact
Any plugin attempting to observe message delivery to build something on top
(per-message metrics, post-delivery UI overlays, analytics extractors, audit
logs) currently gets a complete blind spot for Slack while Telegram works
out of the box.
Proposed fix
Mirror Telegram's pattern in the Slack adapter: add an
emitSlackMessageSentHookshelper that fires both the plugin hook and theinternal hook, and call it from
sendSlackOutboundMessageafter eachsuccessful (and failed)
chat.postMessage.PR with the fix attached.