fix(slack): resolve replyToMode per-message using chat type#24717
Merged
Takhoffman merged 2 commits intoopenclaw:mainfrom Mar 1, 2026
Merged
Conversation
469d49b to
87847be
Compare
87847be to
823c36a
Compare
823c36a to
27ca5cb
Compare
27ca5cb to
99647ea
Compare
99647ea to
90762fb
Compare
|
This pull request has been automatically marked as stale due to inactivity. |
The Slack monitor resolved replyToMode once at startup from the top-level config, ignoring replyToModeByChatType overrides. This caused DM replies to be threaded even when replyToModeByChatType.direct was set to "off". Now the inbound message handler calls resolveSlackReplyToMode(account, chatType) per-message — the same function already used by the outbound dock and tool threading context — so per-chat-type overrides take effect on the inbound path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
90762fb to
bc912a1
Compare
Contributor
|
Merged via salvage path. Merge commit: 9ae9439 What changed before merge:
Verification run on the rebased branch:
All checks passed. |
1 task
ansh
pushed a commit
to vibecode/openclaw
that referenced
this pull request
Mar 2, 2026
…#24717) * fix(slack): resolve replyToMode per-message using chat type The Slack monitor resolved replyToMode once at startup from the top-level config, ignoring replyToModeByChatType overrides. This caused DM replies to be threaded even when replyToModeByChatType.direct was set to "off". Now the inbound message handler calls resolveSlackReplyToMode(account, chatType) per-message — the same function already used by the outbound dock and tool threading context — so per-chat-type overrides take effect on the inbound path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Slack: add changelog for per-message replyToMode resolution --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
steipete
pushed a commit
to Sid-Qin/openclaw
that referenced
this pull request
Mar 2, 2026
…#24717) * fix(slack): resolve replyToMode per-message using chat type The Slack monitor resolved replyToMode once at startup from the top-level config, ignoring replyToModeByChatType overrides. This caused DM replies to be threaded even when replyToModeByChatType.direct was set to "off". Now the inbound message handler calls resolveSlackReplyToMode(account, chatType) per-message — the same function already used by the outbound dock and tool threading context — so per-chat-type overrides take effect on the inbound path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Slack: add changelog for per-message replyToMode resolution --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
safzanpirani
pushed a commit
to safzanpirani/clawdbot
that referenced
this pull request
Mar 2, 2026
…#24717) * fix(slack): resolve replyToMode per-message using chat type The Slack monitor resolved replyToMode once at startup from the top-level config, ignoring replyToModeByChatType overrides. This caused DM replies to be threaded even when replyToModeByChatType.direct was set to "off". Now the inbound message handler calls resolveSlackReplyToMode(account, chatType) per-message — the same function already used by the outbound dock and tool threading context — so per-chat-type overrides take effect on the inbound path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Slack: add changelog for per-message replyToMode resolution --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
steipete
pushed a commit
to Sid-Qin/openclaw
that referenced
this pull request
Mar 2, 2026
…#24717) * fix(slack): resolve replyToMode per-message using chat type The Slack monitor resolved replyToMode once at startup from the top-level config, ignoring replyToModeByChatType overrides. This caused DM replies to be threaded even when replyToModeByChatType.direct was set to "off". Now the inbound message handler calls resolveSlackReplyToMode(account, chatType) per-message — the same function already used by the outbound dock and tool threading context — so per-chat-type overrides take effect on the inbound path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Slack: add changelog for per-message replyToMode resolution --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
amitmiran137
pushed a commit
to amitmiran137/openclaw
that referenced
this pull request
Mar 2, 2026
…#24717) * fix(slack): resolve replyToMode per-message using chat type The Slack monitor resolved replyToMode once at startup from the top-level config, ignoring replyToModeByChatType overrides. This caused DM replies to be threaded even when replyToModeByChatType.direct was set to "off". Now the inbound message handler calls resolveSlackReplyToMode(account, chatType) per-message — the same function already used by the outbound dock and tool threading context — so per-chat-type overrides take effect on the inbound path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Slack: add changelog for per-message replyToMode resolution --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
robertchang-ga
pushed a commit
to robertchang-ga/openclaw
that referenced
this pull request
Mar 2, 2026
…#24717) * fix(slack): resolve replyToMode per-message using chat type The Slack monitor resolved replyToMode once at startup from the top-level config, ignoring replyToModeByChatType overrides. This caused DM replies to be threaded even when replyToModeByChatType.direct was set to "off". Now the inbound message handler calls resolveSlackReplyToMode(account, chatType) per-message — the same function already used by the outbound dock and tool threading context — so per-chat-type overrides take effect on the inbound path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Slack: add changelog for per-message replyToMode resolution --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
hanqizheng
pushed a commit
to hanqizheng/openclaw
that referenced
this pull request
Mar 2, 2026
…#24717) * fix(slack): resolve replyToMode per-message using chat type The Slack monitor resolved replyToMode once at startup from the top-level config, ignoring replyToModeByChatType overrides. This caused DM replies to be threaded even when replyToModeByChatType.direct was set to "off". Now the inbound message handler calls resolveSlackReplyToMode(account, chatType) per-message — the same function already used by the outbound dock and tool threading context — so per-chat-type overrides take effect on the inbound path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Slack: add changelog for per-message replyToMode resolution --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
execute008
pushed a commit
to execute008/openclaw
that referenced
this pull request
Mar 2, 2026
…#24717) * fix(slack): resolve replyToMode per-message using chat type The Slack monitor resolved replyToMode once at startup from the top-level config, ignoring replyToModeByChatType overrides. This caused DM replies to be threaded even when replyToModeByChatType.direct was set to "off". Now the inbound message handler calls resolveSlackReplyToMode(account, chatType) per-message — the same function already used by the outbound dock and tool threading context — so per-chat-type overrides take effect on the inbound path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Slack: add changelog for per-message replyToMode resolution --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
dorgonman
pushed a commit
to kanohorizonia/openclaw
that referenced
this pull request
Mar 3, 2026
…#24717) * fix(slack): resolve replyToMode per-message using chat type The Slack monitor resolved replyToMode once at startup from the top-level config, ignoring replyToModeByChatType overrides. This caused DM replies to be threaded even when replyToModeByChatType.direct was set to "off". Now the inbound message handler calls resolveSlackReplyToMode(account, chatType) per-message — the same function already used by the outbound dock and tool threading context — so per-chat-type overrides take effect on the inbound path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Slack: add changelog for per-message replyToMode resolution --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
sachinkundu
pushed a commit
to sachinkundu/openclaw
that referenced
this pull request
Mar 6, 2026
…#24717) * fix(slack): resolve replyToMode per-message using chat type The Slack monitor resolved replyToMode once at startup from the top-level config, ignoring replyToModeByChatType overrides. This caused DM replies to be threaded even when replyToModeByChatType.direct was set to "off". Now the inbound message handler calls resolveSlackReplyToMode(account, chatType) per-message — the same function already used by the outbound dock and tool threading context — so per-chat-type overrides take effect on the inbound path. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Slack: add changelog for per-message replyToMode resolution --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
zooqueen
pushed a commit
to hanzoai/bot
that referenced
this pull request
Mar 6, 2026
…#24717) * fix(slack): resolve replyToMode per-message using chat type The Slack monitor resolved replyToMode once at startup from the top-level config, ignoring replyToModeByChatType overrides. This caused DM replies to be threaded even when replyToModeByChatType.direct was set to "off". Now the inbound message handler calls resolveSlackReplyToMode(account, chatType) per-message — the same function already used by the outbound dock and tool threading context — so per-chat-type overrides take effect on the inbound path. * Slack: add changelog for per-message replyToMode resolution --------- Co-authored-by: Tak Hoffman <781889+Takhoffman@users.noreply.github.com>
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
replyToModeByChatType.direct: "off"is ignored on the inbound path — DM replies are always threaded when the top-levelreplyToModeis"all".prepare.ts) now callsresolveSlackReplyToMode(account, chatType)per-message instead of using the staticctx.replyToModeresolved once at startup.dispatch.tsreads the resolved value fromprepared.replyToMode.resolveSlackReplyToModecorrectly — those paths are untouched. TheSlackMonitorContext.replyToModefield remains for backward compatibility but is no longer used in the message handler hot path.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
N/A
User-visible / Behavior Changes
replyToModeByChatType.directanddm.replyToModeconfig overrides now take effect on the inbound Slack path. Previously these were silently ignored for inbound message threading.replyToModeByChatType—resolveSlackReplyToModefalls through to the top-levelreplyToMode.Security Impact (required)
Repro + Verification
Environment
{ "channels": { "slack": { "replyToMode": "all", "replyToModeByChatType": { "direct": "off" } } } }Steps
replyToMode: "all"withreplyToModeByChatType.direct: "off"Expected
thread_ts)Actual (before fix)
Evidence
replyToModeByChatType.direct: "off"replyToMode: "all"Human Verification (required)
direct: "off"→ flat reply. Channel message with top-level"all"→ threaded reply.replyToMode: "first"with per-chat-type override (same code path, should work identically).Compatibility / Migration
Failure Recovery (if this breaks)
replyToModeByChatTypefrom config — behavior falls back to top-levelreplyToModeas before.src/slack/monitor/message-handler/prepare.ts,dispatch.ts,types.tsreplyToModeByChatTypeoverrides again (same as current behavior, not worse).Risks and Mitigations
resolveSlackReplyToModeis called per-message instead of once at startup — negligible perf impact (pure in-memory config lookup, no I/O).Greptile Summary
Fixed
replyToModeByChatType.directconfig being ignored on the inbound Slack path. Previously, the message handler used a staticctx.replyToModevalue resolved once at startup, which prevented per-chat-type overrides from taking effect. Now callsresolveSlackReplyToMode(account, chatType)per-message inprepare.ts:202-203and passes the resolved value throughPreparedSlackMessage.replyToMode, whichdispatch.tsconsumes in place of the staticctx.replyToMode.Key changes:
prepare.ts:202-203: resolvereplyToModeper-message based on chat typedispatch.ts:93,104,170,192: readprepared.replyToModeinstead ofctx.replyToModetypes.ts:16: addedreplyToModefield toPreparedSlackMessageprepare.ts:679: include resolvedreplyToModein returned objectIncidental changes in this PR:
resolve-channels.ts:54: changedexclude_archived: falsetotrue(now excludes archived channels from startup resolution)Dockerfile: multi-stage build reduces image size by ~3GBdocker-image-digests.test.ts: updated test to handle multi-stage Dockerfile withASclausesConfidence Score: 5/5
Last reviewed commit: 469d49b