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

推荐订阅源

WordPress大学
WordPress大学
M
MIT News - Artificial intelligence
MyScale Blog
MyScale Blog
博客园_首页
G
Google Developers Blog
博客园 - 【当耐特】
美团技术团队
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
Vercel News
Vercel News
小众软件
小众软件
博客园 - 司徒正美
雷峰网
雷峰网
T
Tailwind CSS Blog
V
V2EX
博客园 - 三生石上(FineUI控件)
F
Fortinet All Blogs
罗磊的独立博客
量子位
P
Proofpoint News Feed
Microsoft Azure Blog
Microsoft Azure Blog
月光博客
月光博客
A
About on SuperTechFans
Hugging Face - Blog
Hugging Face - Blog

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): normalize action thread targets (#73931) · op...
bek91 · 2026-04-29 · via Recent Commits to openclaw:main

@@ -1,5 +1,6 @@

11

import type { AgentToolResult } from "@mariozechner/pi-agent-core";

22

import { isSingleUseReplyToMode } from "openclaw/plugin-sdk/reply-reference";

3+

import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime";

34

import { parseSlackBlocksInput } from "./blocks-input.js";

45

import {

56

createActionGate,

@@ -26,6 +27,19 @@ const messagingActions = new Set([

2627

const reactionsActions = new Set(["react", "reactions"]);

2728

const pinActions = new Set(["pinMessage", "unpinMessage", "listPins"]);

282930+

function sameSlackChannelTarget(targetChannel: string, currentChannelId: string): boolean {

31+

const parsedTarget = parseSlackTarget(targetChannel, {

32+

defaultKind: "channel",

33+

});

34+

if (!parsedTarget || parsedTarget.kind !== "channel") {

35+

return false;

36+

}

37+

return (

38+

normalizeLowercaseStringOrEmpty(parsedTarget.id) ===

39+

normalizeLowercaseStringOrEmpty(currentChannelId)

40+

);

41+

}

42+2943

type SlackActionsRuntimeModule = typeof import("./actions.runtime.js");

3044

type SlackAccountsRuntimeModule = typeof import("./accounts.runtime.js");

3145

@@ -105,16 +119,8 @@ function resolveThreadTsFromContext(

105119

return undefined;

106120

}

107121108-

const parsedTarget = parseSlackTarget(targetChannel, {

109-

defaultKind: "channel",

110-

});

111-

if (!parsedTarget || parsedTarget.kind !== "channel") {

112-

return undefined;

113-

}

114-

const normalizedTarget = parsedTarget.id;

115-116122

// Different channel - don't inject

117-

if (normalizedTarget !== context.currentChannelId) {

123+

if (!sameSlackChannelTarget(targetChannel, context.currentChannelId)) {

118124

return undefined;

119125

}

120126

@@ -267,8 +273,7 @@ export async function handleSlackAction(

267273

// threadTs: once we send a message to the current channel, consider the

268274

// first reply "used" so later tool calls don't auto-thread again.

269275

if (context?.hasRepliedRef && context.currentChannelId) {

270-

const parsedTarget = parseSlackTarget(to, { defaultKind: "channel" });

271-

if (parsedTarget?.kind === "channel" && parsedTarget.id === context.currentChannelId) {

276+

if (sameSlackChannelTarget(to, context.currentChannelId)) {

272277

context.hasRepliedRef.value = true;

273278

}

274279

}

@@ -310,8 +315,7 @@ export async function handleSlackAction(

310315

}

311316312317

if (context?.hasRepliedRef && context.currentChannelId) {

313-

const parsedTarget = parseSlackTarget(to, { defaultKind: "channel" });

314-

if (parsedTarget?.kind === "channel" && parsedTarget.id === context.currentChannelId) {

318+

if (sameSlackChannelTarget(to, context.currentChannelId)) {

315319

context.hasRepliedRef.value = true;

316320

}

317321

}