fix(slack): extract attachment text for bot messages with empty text (#27616)#27642
Merged
Takhoffman merged 2 commits intoopenclaw:mainfrom Mar 1, 2026
Merged
Conversation
Contributor
Greptile SummaryAdds a fallback to extract text from bot message attachments when Key changes:
The implementation is targeted and sound, properly handling edge cases with Confidence Score: 5/5
Last reviewed commit: e4fe011 |
e4fe011 to
cd9c889
Compare
Contributor
|
PR #27642 - fix(slack): extract attachment text for bot messages with empty text (#27616) (#27642) Merged via squash.
Thank you for the contribution. |
18 tasks
zooqueen
added a commit
to hanzoai/bot
that referenced
this pull request
Mar 1, 2026
…penclaw#27616) (openclaw#27642) Cherry-pick of upstream 43ddb41.
ansh
pushed a commit
to vibecode/openclaw
that referenced
this pull request
Mar 2, 2026
…penclaw#27616) (openclaw#27642) Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini
steipete
pushed a commit
to Sid-Qin/openclaw
that referenced
this pull request
Mar 2, 2026
…penclaw#27616) (openclaw#27642) Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini
safzanpirani
pushed a commit
to safzanpirani/clawdbot
that referenced
this pull request
Mar 2, 2026
…penclaw#27616) (openclaw#27642) Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini
steipete
pushed a commit
to Sid-Qin/openclaw
that referenced
this pull request
Mar 2, 2026
…penclaw#27616) (openclaw#27642) Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini
amitmiran137
pushed a commit
to amitmiran137/openclaw
that referenced
this pull request
Mar 2, 2026
…penclaw#27616) (openclaw#27642) Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini
robertchang-ga
pushed a commit
to robertchang-ga/openclaw
that referenced
this pull request
Mar 2, 2026
…penclaw#27616) (openclaw#27642) Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini
hanqizheng
pushed a commit
to hanqizheng/openclaw
that referenced
this pull request
Mar 2, 2026
…penclaw#27616) (openclaw#27642) Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini
execute008
pushed a commit
to execute008/openclaw
that referenced
this pull request
Mar 2, 2026
…penclaw#27616) (openclaw#27642) Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini
dorgonman
pushed a commit
to kanohorizonia/openclaw
that referenced
this pull request
Mar 3, 2026
…penclaw#27616) (openclaw#27642) Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini
sachinkundu
pushed a commit
to sachinkundu/openclaw
that referenced
this pull request
Mar 6, 2026
…penclaw#27616) (openclaw#27642) Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
…penclaw#27616) (openclaw#27642) Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini
zooqueen
added a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
…penclaw#27616) (openclaw#27642) Cherry-pick of upstream 43ddb41.
alexey-pelykh
pushed a commit
to remoteclaw/remoteclaw
that referenced
this pull request
Mar 15, 2026
…penclaw#27616) (openclaw#27642) Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini (cherry picked from commit 43ddb41)
alexey-pelykh
pushed a commit
to remoteclaw/remoteclaw
that referenced
this pull request
Mar 15, 2026
…penclaw#27616) (openclaw#27642) Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini (cherry picked from commit 43ddb41)
alexey-pelykh
added a commit
to remoteclaw/remoteclaw
that referenced
this pull request
Mar 15, 2026
…penclaw#27616) (openclaw#27642) (#1424) Verified: - pnpm install --frozen-lockfile - pnpm build - pnpm check - pnpm test:macmini (cherry picked from commit 43ddb41) Co-authored-by: lailoo <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bot messages with empty
textbut content inattachmentsnow trigger sessions whenallowBots: trueis set.Problem
Monitoring webhooks (Prometheus Alertmanager, Gatus, etc.) send Slack messages with
text: ""and all content inattachments. These messages were silently dropped becauseresolveSlackAttachmentContentonly processes forwarded attachments (is_share: true), and the empty-body check at the end ofprepareSlackMessagereturnednull.Closes #27616
Changes
botAttachmentTextfallback inprepareSlackMessagethat extractstextorfallbackfrom non-forwarded attachments when the message is from a bot and would otherwise have an empty body.isBotMessage) and only whenresolveSlackAttachmentContentdidn't already extract text, avoiding double-inclusion.Test plan
allowBots: true, emptytext, and non-forwarded attachments now produces a non-null prepared message with attachment text inRawBody.prepare.test.tscontinue to pass.pnpm lintandpnpm format:checkpass clean.Effect on User Experience
Before: Bot messages from monitoring webhooks with empty
textwere silently ignored even withallowBots: true. Users had to manually reply in thread to trigger the agent.After: The agent receives the attachment content and can autonomously react to alerts, enabling hands-free monitoring workflows.