Skip to content

Conversation

@stefangalescu
Copy link
Contributor

Summary

Adds support for separate replyToMode settings for DMs vs channels in Slack.

Changes

  • Add channels.slack.dm.replyToMode config option for DM-specific threading behavior
  • Keep channels.slack.replyToMode as the default/fallback for channels
  • Add resolveSlackReplyToMode helper to centralize the resolution logic
  • Pass chatType through the threading resolution chain
  • Add tests for the new behavior
  • Update docs with new config option

Usage

{
  channels: {
    slack: {
      replyToMode: "off",     // default for channels
      dm: {
        replyToMode: "all"    // DMs always thread
      }
    }
  }
}

When dm.replyToMode is set, DMs use that mode; channels use the top-level replyToMode. If dm.replyToMode is not set, both DMs and channels use the top-level setting (backward compatible).

Testing

  • Added tests in reply-threading.test.ts for DM-specific mode resolution
  • Added new test file threading-tool-context.test.ts for tool context behavior
  • All 16 tests pass

Adds support for separate replyToMode settings for DMs vs channels:

- Add channels.slack.dm.replyToMode for DM-specific threading
- Keep channels.slack.replyToMode as default for channels
- Add resolveSlackReplyToMode helper to centralize logic
- Pass chatType through threading resolution chain

Usage:
```json5
{
  channels: {
    slack: {
      replyToMode: "off",     // channels
      dm: {
        replyToMode: "all"    // DMs always thread
      }
    }
  }
}
```

When dm.replyToMode is set, DMs use that mode; channels use the
top-level replyToMode. Backward compatible when not configured.
@steipete steipete self-assigned this Jan 23, 2026
@steipete steipete merged commit 7b40d1b into openclaw:main Jan 23, 2026
19 of 22 checks passed
@steipete
Copy link
Contributor

Landed via temp rebase onto main.\n\n- Gate: pnpm lint && pnpm build && pnpm test\n- Land commit: 7b40d1b\n- Merge commit: 7b40d1b\n\nThanks @stefangalescu!

@steipete
Copy link
Contributor

Follow-up on main after merge:

  • Added channels.slack.replyToModeByChatType (direct/group/channel) and wired resolver precedence; legacy channels.slack.dm.replyToMode kept as fallback for direct when no override exists.
  • Updated Slack config schema/types and threading tests (reply-threading + threading tool context).
  • Expanded Slack docs with precedence + multiple config examples.

Commits:

  • 26d51ef3a (config + resolver + tests + changelog)
  • 786fe680f (docs: expanded examples + precedence)

Gate: pnpm lint && pnpm build && pnpm test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants