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:
committed by
Peter Steinberger
parent
6ffd7111a6
commit
09ce6ff99e
@@ -56,6 +56,7 @@ export async function prepareSlackMessage(params: {
|
||||
channelId: message.channel,
|
||||
channelName,
|
||||
channels: ctx.channelsConfig,
|
||||
defaultRequireMention: ctx.defaultRequireMention,
|
||||
})
|
||||
: null;
|
||||
|
||||
@@ -200,7 +201,9 @@ export async function prepareSlackMessage(params: {
|
||||
cfg,
|
||||
surface: "slack",
|
||||
});
|
||||
const shouldRequireMention = isRoom ? (channelConfig?.requireMention ?? true) : false;
|
||||
const shouldRequireMention = isRoom
|
||||
? (channelConfig?.requireMention ?? ctx.defaultRequireMention)
|
||||
: false;
|
||||
|
||||
// Allow "control commands" to bypass mention gating if sender is authorized.
|
||||
const shouldBypassMention =
|
||||
|
||||
Reference in New Issue
Block a user