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

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
月光博客
月光博客
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
Tailwind CSS Blog
大猫的无限游戏
大猫的无限游戏
The Cloudflare Blog
博客园_首页
Jina AI
Jina AI
WordPress大学
WordPress大学
小众软件
小众软件
阮一峰的网络日志
阮一峰的网络日志
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 三生石上(FineUI控件)
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 叶小钗
美团技术团队
IT之家
IT之家
爱范儿
爱范儿
有赞技术团队
有赞技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
量子位
博客园 - 聂微东
人人都是产品经理
人人都是产品经理
博客园 - 【当耐特】

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(feishu): do not treat @all as a bot mention (#72658) ...
vincentkoc · 2026-04-27 · via Recent Commits to openclaw:main

@@ -92,6 +92,45 @@ describe("parseFeishuMessageEvent – mentionedBot", () => {

9292

expect(ctx.mentionedBot).toBe(false);

9393

});

949495+

it("returns mentionedBot=false for broadcast-only @_all text", () => {

96+

const event = makeEvent("group", [], "@_all please review");

97+

const ctx = parseFeishuMessageEvent(event, BOT_OPEN_ID);

98+

expect(ctx.mentionedBot).toBe(false);

99+

});

100+101+

it("returns mentionedBot=false for broadcast-only @all mention metadata", () => {

102+

const event = makeEvent("group", [{ key: "@_all", name: "all", id: { open_id: "all" } }]);

103+

const ctx = parseFeishuMessageEvent(event, BOT_OPEN_ID);

104+

expect(ctx.mentionedBot).toBe(false);

105+

});

106+107+

it("returns mentionedBot=false for @all even when botOpenId is the broadcast id", () => {

108+

const event = makeEvent("group", [{ key: "@_all", name: "all", id: { open_id: "all" } }]);

109+

const ctx = parseFeishuMessageEvent(event, "all");

110+

expect(ctx.mentionedBot).toBe(false);

111+

});

112+113+

it("returns mentionedBot=true when bot is mentioned alongside @all", () => {

114+

const event = makeEvent("group", [

115+

{ key: "@_all", name: "all", id: { open_id: "all" } },

116+

{ key: "@_bot_1", name: "Bot", id: { open_id: BOT_OPEN_ID } },

117+

]);

118+

const ctx = parseFeishuMessageEvent(event, BOT_OPEN_ID);

119+

expect(ctx.mentionedBot).toBe(true);

120+

expect(ctx.mentionTargets).toBeUndefined();

121+

});

122+123+

it("does not include @all in mention-forward targets", () => {

124+

const event = makeEvent("group", [

125+

{ key: "@_all", name: "all", id: { open_id: "all" } },

126+

{ key: "@_bot_1", name: "Bot", id: { open_id: BOT_OPEN_ID } },

127+

{ key: "@_user_1", name: "Alice", id: { open_id: "ou_alice" } },

128+

]);

129+

const ctx = parseFeishuMessageEvent(event, BOT_OPEN_ID);

130+

expect(ctx.mentionedBot).toBe(true);

131+

expect(ctx.mentionTargets).toEqual([{ openId: "ou_alice", name: "Alice", key: "@_user_1" }]);

132+

});

133+95134

it("returns mentionedBot=false when botOpenId is undefined (unknown bot)", () => {

96135

const event = makeEvent("group", [

97136

{ key: "@_user_1", name: "Alice", id: { open_id: "ou_alice" } },

@@ -159,6 +198,39 @@ describe("parseFeishuMessageEvent – mentionedBot", () => {

159198

expect(ctx.mentionedBot).toBe(false);

160199

});

161200201+

it("returns mentionedBot=false for post message with broadcast-only @all", () => {

202+

const event = makePostEvent({

203+

content: [

204+

[{ tag: "at", user_id: "all", user_name: "all" }],

205+

[{ tag: "text", text: "hello" }],

206+

],

207+

});

208+

const ctx = parseFeishuMessageEvent(event, BOT_OPEN_ID);

209+

expect(ctx.mentionedBot).toBe(false);

210+

});

211+212+

it("returns mentionedBot=false for post @all even when botOpenId is the broadcast id", () => {

213+

const event = makePostEvent({

214+

content: [[{ tag: "at", user_id: "all", user_name: "all" }]],

215+

});

216+

const ctx = parseFeishuMessageEvent(event, "all");

217+

expect(ctx.mentionedBot).toBe(false);

218+

});

219+220+

it("returns mentionedBot=true for post message with bot mention and broadcast @all", () => {

221+

const event = makePostEvent({

222+

content: [

223+

[

224+

{ tag: "at", user_id: "all", user_name: "all" },

225+

{ tag: "text", text: " " },

226+

{ tag: "at", user_id: BOT_OPEN_ID, user_name: "claw" },

227+

],

228+

],

229+

});

230+

const ctx = parseFeishuMessageEvent(event, BOT_OPEN_ID);

231+

expect(ctx.mentionedBot).toBe(true);

232+

});

233+162234

it("preserves post code and code_block content", () => {

163235

const event = makePostEvent({

164236

content: [