fix(slack): respect top-level requireMention config

The `channels.slack.requireMention` setting was defined in the schema
but never passed to `resolveSlackChannelConfig()`, which always
defaulted to `true`. This meant setting `requireMention: false` at the
top level had no effect—channels still required mentions.

Pass `slackCfg.requireMention` as `defaultRequireMention` to the
resolver and use it as the fallback instead of hardcoded `true`.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Jonathan Wilkins
2026-01-13 14:21:23 +00:00
committed by Peter Steinberger
parent 6ffd7111a6
commit 09ce6ff99e
9 changed files with 96 additions and 5 deletions

View File

@@ -75,6 +75,8 @@ export type SlackAccountConfig = {
appToken?: string;
/** Allow bot-authored messages to trigger replies (default: false). */
allowBots?: boolean;
/** Default mention requirement for channel messages (default: true). */
requireMention?: boolean;
/**
* Controls how channel messages are handled:
* - "open": channels bypass allowlists; mention-gating applies

View File

@@ -212,6 +212,7 @@ export const SlackAccountSchema = z.object({
botToken: z.string().optional(),
appToken: z.string().optional(),
allowBots: z.boolean().optional(),
requireMention: z.boolean().optional(),
groupPolicy: GroupPolicySchema.optional().default("allowlist"),
historyLimit: z.number().int().min(0).optional(),
dmHistoryLimit: z.number().int().min(0).optional(),