fix(slack): remove backward-compat fallback that overrides isThreadReply with incomingThreadTs

This commit is contained in:
Ken Shimizu
2026-04-06 20:14:27 +09:00
committed by Peter Steinberger
parent 4a4741444e
commit 177b326354

View File

@@ -138,12 +138,10 @@ function createSlackReplyReferencePlanner(params: {
hasReplied?: boolean;
isThreadReply?: boolean;
}) {
// Keep backward-compatible behavior: when a thread id is present and caller
// does not provide explicit classification, stay in thread. Callers that can
// distinguish Slack's auto-populated top-level thread_ts should pass
// `isThreadReply: false` to preserve replyToMode behavior.
const effectiveIsThreadReply = params.isThreadReply ?? Boolean(params.incomingThreadTs);
const effectiveMode = effectiveIsThreadReply ? "all" : params.replyToMode;
// Only force threading for genuine user thread replies. Slack auto-populates
// thread_ts on top-level messages; respect the configured replyToMode there.
// See: openclaw/openclaw#23839
const effectiveMode = params.isThreadReply ? "all" : params.replyToMode;
return createReplyReferencePlanner({
replyToMode: effectiveMode,
existingId: params.incomingThreadTs,