惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园_首页
量子位
D
DataBreaches.Net
博客园 - 司徒正美
J
Java Code Geeks
博客园 - 【当耐特】
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
aimingoo的专栏
aimingoo的专栏
B
Blog
The Cloudflare Blog
D
Docker
I
InfoQ
爱范儿
爱范儿
MongoDB | Blog
MongoDB | Blog
腾讯CDC
月光博客
月光博客
Hugging Face - Blog
Hugging Face - Blog
Microsoft Azure Blog
Microsoft Azure Blog
Vercel News
Vercel News
阮一峰的网络日志
阮一峰的网络日志
小众软件
小众软件
S
SegmentFault 最新的问题
GbyAI
GbyAI
有赞技术团队
有赞技术团队

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(slack): improve bot parity · openclaw/openclaw@8654144
steipete · 2026-05-10 · via Recent Commits to openclaw:main

@@ -101,7 +101,7 @@ type SlackConversationContext = {

101101

isRoom: boolean;

102102

isRoomish: boolean;

103103

channelConfig: ReturnType<typeof resolveSlackChannelConfig> | null;

104-

allowBots: boolean;

104+

allowBotsMode: "off" | "all" | "mentions";

105105

isBotMessage: boolean;

106106

};

107107

@@ -149,11 +149,13 @@ async function resolveSlackConversationContext(params: {

149149

allowNameMatching: ctx.allowNameMatching,

150150

})

151151

: null;

152-

const allowBots =

152+

const allowBotsSetting =

153153

channelConfig?.allowBots ??

154154

account.config?.allowBots ??

155155

cfg.channels?.slack?.allowBots ??

156156

false;

157+

const allowBotsMode: "off" | "all" | "mentions" =

158+

allowBotsSetting === "mentions" ? "mentions" : allowBotsSetting ? "all" : "off";

157159158160

return {

159161

channelInfo,

@@ -164,7 +166,7 @@ async function resolveSlackConversationContext(params: {

164166

isRoom,

165167

isRoomish,

166168

channelConfig,

167-

allowBots,

169+

allowBotsMode,

168170

isBotMessage: Boolean(message.bot_id),

169171

};

170172

}

@@ -176,14 +178,14 @@ async function authorizeSlackInboundMessage(params: {

176178

conversation: SlackConversationContext;

177179

}): Promise<SlackAuthorizationContext | null> {

178180

const { ctx, account, message, conversation } = params;

179-

const { isDirectMessage, channelName, resolvedChannelType, isBotMessage, allowBots } =

181+

const { isDirectMessage, channelName, resolvedChannelType, isBotMessage, allowBotsMode } =

180182

conversation;

181183182184

if (isBotMessage) {

183185

if (message.user && ctx.botUserId && message.user === ctx.botUserId) {

184186

return null;

185187

}

186-

if (!allowBots) {

188+

if (allowBotsMode === "off") {

187189

logVerbose(`slack: drop bot message ${message.bot_id ?? "unknown"} (allowBots=false)`);

188190

return null;

189191

}

@@ -273,7 +275,7 @@ export async function prepareSlackMessage(params: {

273275

isRoom,

274276

isRoomish,

275277

channelConfig,

276-

allowBots,

278+

allowBotsMode,

277279

isBotMessage,

278280

} = conversation;

279281

const authorization = await authorizeSlackInboundMessage({

@@ -463,6 +465,8 @@ export async function prepareSlackMessage(params: {

463465

...(ctx.threadRequireExplicitMention ? { allowedImplicitMentionKinds: [] } : {}),

464466

},

465467

});

468+

const effectiveWasMentioned = messageIngress.activationAccess.effectiveWasMentioned ?? false;

469+

const shouldBypassMention = messageIngress.activationAccess.shouldBypassMention ?? false;

466470

const senderGate = messageIngress.senderAccess.gate;

467471

if (isRoom && senderGate?.allowed === false) {

468472

logVerbose(`Blocked unauthorized slack sender ${senderId} (not in channel users)`);

@@ -471,7 +475,7 @@ export async function prepareSlackMessage(params: {

471475

if (

472476

isRoom &&

473477

isBotMessage &&

474-

allowBots &&

478+

allowBotsMode !== "off" &&

475479

!(await authorizeSlackBotRoomMessage({

476480

ctx,

477481

channelId: message.channel,

@@ -484,6 +488,14 @@ export async function prepareSlackMessage(params: {

484488

return null;

485489

}

486490491+

if (isBotMessage && allowBotsMode === "mentions") {

492+

const botMentioned = isDirectMessage || effectiveWasMentioned || shouldBypassMention;

493+

if (!botMentioned) {

494+

logVerbose("slack: drop bot message (allowBots=mentions, missing mention)");

495+

return null;

496+

}

497+

}

498+487499

const threadContextAllowFromLower = isRoom

488500

? channelUsersAllowlistConfigured

489501

? normalizeAllowListLower(channelConfig?.users)

@@ -508,8 +520,6 @@ export async function prepareSlackMessage(params: {

508520

return null;

509521

}

510522511-

const effectiveWasMentioned = messageIngress.activationAccess.effectiveWasMentioned ?? false;

512-

const shouldBypassMention = messageIngress.activationAccess.shouldBypassMention ?? false;

513523

if (isRoom && shouldRequireMention && messageIngress.activationAccess.shouldSkip) {

514524

ctx.logger.info({ channel: message.channel, reason: "no-mention" }, "skipping channel message");

515525

const pendingText = (message.text ?? "").trim();