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

推荐订阅源

Application and Cybersecurity Blog
Application and Cybersecurity Blog
A
About on SuperTechFans
S
SegmentFault 最新的问题
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Help Net Security
Help Net Security
有赞技术团队
有赞技术团队
博客园 - 【当耐特】
O
OpenAI News
美团技术团队
月光博客
月光博客
Apple Machine Learning Research
Apple Machine Learning Research
Schneier on Security
Schneier on Security
Webroot Blog
Webroot Blog
Cyberwarzone
Cyberwarzone
Hacker News - Newest:
Hacker News - Newest: "LLM"
Google Online Security Blog
Google Online Security Blog
T
Tenable Blog
S
Security Affairs
博客园_首页
S
Schneier on Security
Security Latest
Security Latest
T
Threat Research - Cisco Blogs
T
Tailwind CSS Blog
大猫的无限游戏
大猫的无限游戏
Spread Privacy
Spread Privacy
量子位
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
K
Kaspersky official blog
Hugging Face - Blog
Hugging Face - Blog
TaoSecurity Blog
TaoSecurity Blog
博客园 - 聂微东
Vercel News
Vercel News
M
MIT News - Artificial intelligence
T
Troy Hunt's Blog
B
Blog
MongoDB | Blog
MongoDB | Blog
Martin Fowler
Martin Fowler
Attack and Defense Labs
Attack and Defense Labs
L
LINUX DO - 最新话题
D
DataBreaches.Net
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Stack Overflow Blog
Stack Overflow Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
博客园 - Franky
W
WeLiveSecurity
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
F
Fortinet All Blogs
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
Check Point Blog
H
Hacker News: Front Page

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 test: trim doctor command hotspots · openclaw/openclaw@c66f16a test: isolate agent auth and spawn hotspots · openclaw/openclaw@9285935 test: stabilize MCP startup disposal race · openclaw/openclaw@dd9d2eb test: merge browser contract server suites · openclaw/openclaw@5817a76 test: narrow ollama provider discovery setup · openclaw/openclaw@a0d9598 build: declare qa-lab aimock runtime dependency · openclaw/openclaw@24431e5 test: speed up safe-bins exec harness · openclaw/openclaw@ee856ab test: preserve tool helpers in embedded runner mocks · openclaw/openclaw@acd86a0 refactor: move memory embeddings into provider plugins · openclaw/openclaw@77e6e4c test: reuse system-run temp fixtures · openclaw/openclaw@7e9ff0f test: trim hotspot wait overhead · openclaw/openclaw@12a59b0 Check: avoid duplicate boundary prep · openclaw/openclaw@baf11b8 test: reduce hotspot fixture overhead · openclaw/openclaw@3a59edd feat(ui): overhaul settings and slash command UX (#67819) thanks @Bun… · openclaw/openclaw@2cfb660 QA Matrix: exit cleanly on failure · openclaw/openclaw@42805d2 QA Matrix: isolate scenario coverage · openclaw/openclaw@7e659e1 Matrix: refresh crypto bootstrap state · openclaw/openclaw@94081d8 QA Lab: add provider registry · openclaw/openclaw@bb7e982 Matrix: add plugin changelog · openclaw/openclaw@4acab55 test: trim more hotspot overhead · openclaw/openclaw@f485311 test: trim remaining hotspot tests · openclaw/openclaw@6ba8626 test: narrow hotspot mocks · openclaw/openclaw@dbc8179 test: isolate gemini embedding request helpers · openclaw/openclaw@cd330f5 test: trim memory and mcp hotspots · openclaw/openclaw@fd48dfa test: slim provider registry mocks · openclaw/openclaw@2e08c77 test: harden Parallels update smoke · openclaw/openclaw@1a98090 feat: default Anthropic to Opus 4.7 · openclaw/openclaw@628b454 fix: harden node-host shell payload mutability checks · openclaw/openclaw@75c551e fix: land node-host approval binding for native binaries (#66731) (th… · openclaw/openclaw@29919bb CI: add daily schedule to CodeQL workflow (#67645) · openclaw/openclaw@69d25f5 fix(gateway): capture config hash after plugin auto-enable to prevent… · openclaw/openclaw@8c11210 fix: repair sanitized replay tool results before send (#67620) (thank… · openclaw/openclaw@c3c7a99 fix: restrict HTML timeout short-circuit to transient statuses · openclaw/openclaw@de129a6 fix: keep TUI watchdog bound to active run (#67401) (thanks @xantorres) · openclaw/openclaw@3525273 Gateway/skills: dedupe skills prefix-match + drop dead fallback on log · openclaw/openclaw@d7f489f Extensions/lmstudio: back off inference preload after consecutive fai… · openclaw/openclaw@b555214 TUI/streaming: add watchdog that resets the activity indicator after … · openclaw/openclaw@f44ab20 Agents/tool-loop: enable unknown-tool stream guard by default · openclaw/openclaw@36ed367 Gateway/skills: invalidate session skills snapshot on config write · openclaw/openclaw@b23d59a fix: classify HTML provider error pages correctly (#67642) (thanks @s… · openclaw/openclaw@e588e90 fix(skills): remove unused model-usage import (#67641) · openclaw/openclaw@55f05df docs(changelog): credit codex fix superseded PRs · openclaw/openclaw@e485f24 fix(openai-codex): normalize stale transport metadata in resolution a… · openclaw/openclaw@90801ba CI: pin Docker-related GitHub Actions (#67632) · openclaw/openclaw@f697b01 Android: modernize WebView and discovery API usage (#67627) · openclaw/openclaw@44a6e50 fix(deps): bump hono to 4.12.14 and @hono/node-server to 1.19.14 (GHS… · openclaw/openclaw@fbccc18 fix(deps): bump dompurify to 3.4.0 (#67614) · openclaw/openclaw@2c2dc00 CI: add explicit permissions to all workflow jobs (fixes code-scannin… · openclaw/openclaw@01b7516 fix: register bundled TTS providers and route overrides correctly (#6… · openclaw/openclaw@6ea3cdd fix: align host tilde paths with OS home (#62804) (thanks @stainlu) · openclaw/openclaw@ecfaf64 fix: flush creds queue before reconnect socket open (#67464) (thanks … · openclaw/openclaw@405c63f fix: strip standalone <function> tool call tags from visible text (#6… · openclaw/openclaw@78df859 fix(agents): preserve cli session metadata before transcript persist … · openclaw/openclaw@898fd04 docs(changelog): move cli transcript entry · openclaw/openclaw@c1817c6 fix(agents): normalize cli transcript api field · openclaw/openclaw@3a3fae0 docs(changelog): note cli transcript persistence · openclaw/openclaw@6c343f1 fix(agents): persist cli transcript turns · openclaw/openclaw@b8ef507 fix(msteams): harden security-sensitive flows (#65841) · openclaw/openclaw@c56b56e [Dashboard] Fix exec approval modal overflow for long command content… · openclaw/openclaw@053c5b0 Docs: remove QA changelog entry · openclaw/openclaw@7fd5771 QA: fix private runtime source loading (#67428) · openclaw/openclaw@d5933af docs(gateway): correct protocol.md schema path, hello-ok example, aut… · openclaw/openclaw@489404d CI: pin Node 22 runners to 22.18.0 · openclaw/openclaw@4ffa621 models.authStatus: normalize provider ids + tighten env-backed escape… · openclaw/openclaw@f2fdb9d Update CHANGELOG.md · openclaw/openclaw@7694a92 test(parallels): clean up npm update guard jobs · openclaw/openclaw@045ea7b Plugins: prefer scanDir override paths · openclaw/openclaw@b2974da fix(dreaming): default storage.mode to "separate" so phase blocks sto… · openclaw/openclaw@8c392f0 fix(memory-core): skip dreaming transcript ingestion via session stor… · openclaw/openclaw@a1b01f0 fix: dedupe replayed exec.finished node events (#67281) · openclaw/openclaw@5dcf526
fix(feishu): fetch quoted content before empty-message guard (#90192) · openclaw/openclaw@bda7581
bladin · 2026-06-17 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -26,6 +26,7 @@ Docs: https://docs.openclaw.ai

2626
2727

- Channels and delivery: preserve account-scoped DM channel send policy, intentional rich-message line breaks in Telegram and status output, rich Telegram final replies, rich Telegram tables and lists, Telegram thread-create CLI remapping, Feishu dynamic-agent routes after persisted binding reuse, Slack outbound `message_sent` hooks, contributed message-tool schema optionality, same-channel generated media completions, and channel chunking around surrogate pairs and Infinity limits. (#92788, #93164, #92679, #89421, #89943, #42837, #92814, #91137, #91246, #92735) Thanks @yetval, @obviyus, @spacegeologist, @rishitamrakar, @liuhao1024, @lundog, @TurboTheTurtle, and @yhterrance.

2828

- Gemini CLI: use the selected OpenClaw OAuth/API-key auth profile in an isolated Gemini CLI runtime home, preventing ambient Google machine credentials from overriding the chosen profile. (#88748) Thanks @jason-allen-oneal and @shakkernerd.

29+

- Feishu: fetch quoted/replied message content before the empty-message guard so a mention-only reply that quotes a message with meaningful content is no longer dropped. (#90192) Thanks @bladin.

2930

- Discord: give generated auto-thread titles a 60-second timeout and 4,096-token reasoning-model output budget, clamped to the selected model output cap. (#64734) Thanks @hanamizuki.

3031

- Agent, cron, and Gateway runtime: mark active main sessions before restart shutdown aborts, pause yielded subagent runs whose terminal also signals abort, clamp trusted subagent thinking overrides through provider/model fallback, preserve yielded media completions, deliver channel message-tool final replies through auto-reply while hiding internal delivery hints, restore reset archive fallback reads when active async transcripts are missing, de-duplicate main-session heartbeat events, expose session identity in runtime prompts, reject unknown OpenAI agent selectors, keep generated media completions, slash-command block replies, and trajectory export commands in WebChat, and require admin privileges for HTTP session/model override surfaces. (#91357, #92631, #92412, #92146, #92879, #91287, #92468, #92510, #91246, #92651, #92646) Thanks @ooiuuii, @openperf, @IWhatsskill, @masatohoshino, @CadanHu, @ZengWen-DT, @zhangguiping-xydt, and @TurboTheTurtle.

3132

- Providers and model replay: preserve storeless OpenAI Responses replay compatibility, recover invalid OpenAI reasoning signatures and genericized Anthropic thinking-signature replay errors, route OAuth image defaults through Codex for eligible OpenAI profiles, avoid eager tool streaming for Claude 4.5 in Copilot, quarantine unreadable and post-hook OpenAI/Anthropic-family tool schemas without broadening allowed tool choices, deliver explicit thinking-off requests to LM Studio binary-thinking models, honor profile auth for SecretRef model entries, bound model browsing, strip provider prefixes where runtimes need bare IDs, and surface nested embedding fetch failures. (#90706, #92941, #92201, #92916, #92824, #75393, #92908, #92921, #92928, #92002, #90686, #92247, #92627, #91218, #92628) Thanks @snowzlm, @mmyzwl, @CarlCapital, @bek91, @Kailigithub, @vincentkoc, @rohitjavvadi, @samson910022, @nxmxbbd, @liuhao1024, @bymle, and @mushuiyu886.

Original file line numberDiff line numberDiff line change

@@ -424,6 +424,7 @@ async function dispatchMessage(params: {

424424

currentCfg?: ClawdbotConfig;

425425

event: FeishuMessageEvent;

426426

channelRuntime?: PluginRuntime["channel"];

427+

botOpenId?: string;

427428

}) {

428429

const runtime = createRuntimeEnv();

429430

const feishuConfig = params.cfg.channels?.feishu;

@@ -444,6 +445,7 @@ async function dispatchMessage(params: {

444445

await handleFeishuMessage({

445446

cfg,

446447

event: params.event,

448+

botOpenId: params.botOpenId,

447449

runtime,

448450

channelRuntime: params.channelRuntime,

449451

});

@@ -4164,6 +4166,150 @@ describe("handleFeishuMessage command authorization", () => {

41644166

// No reply should be dispatched: empty message is silently skipped

41654167

expect(mockDispatchReplyFromConfig).not.toHaveBeenCalled();

41664168

});

4169+
4170+

it("does not drop empty-text message when it quotes a parent message (#90177)", async () => {

4171+

// A Feishu reply containing only @bot (no additional text) was being

4172+

// dropped before the quoted message content was fetched. The handler

4173+

// should fetch quoted content first and only skip if all of current

4174+

// text, media, and quoted content are empty.

4175+

mockShouldComputeCommandAuthorized.mockReturnValue(false);

4176+

mockGetMessageFeishu.mockResolvedValueOnce({

4177+

messageId: "om_quoted_001",

4178+

chatId: "oc-dm",

4179+

content: "quoted message content from parent",

4180+

contentType: "text",

4181+

});

4182+
4183+

const cfg: ClawdbotConfig = {

4184+

channels: {

4185+

feishu: {

4186+

dmPolicy: "open",

4187+

allowFrom: ["*"],

4188+

},

4189+

},

4190+

} as ClawdbotConfig;

4191+
4192+

const event: FeishuMessageEvent = {

4193+

sender: {

4194+

sender_id: {

4195+

open_id: "ou-reply-only-bot",

4196+

},

4197+

},

4198+

message: {

4199+

message_id: "msg-empty-with-quote",

4200+

parent_id: "om_quoted_001",

4201+

chat_id: "oc-dm",

4202+

chat_type: "p2p",

4203+

message_type: "text",

4204+

// Empty text — only @bot mention, no additional content

4205+

content: JSON.stringify({ text: "" }),

4206+

},

4207+

};

4208+
4209+

await dispatchMessage({ cfg, event });

4210+
4211+

// A reply should be dispatched because quoted content provides context

4212+

expect(mockDispatchReplyFromConfig).toHaveBeenCalledTimes(1);

4213+

});

4214+
4215+

it("dispatches mention-only group reply with quoted content in requireMention:true group (#90177)", async () => {

4216+

// #90177 is specifically about group chats. The empty-message drop happens

4217+

// after the group admission/mention gate, so the fix must also work when

4218+

// the sender mentions the bot in a requireMention:true group and quotes a

4219+

// parent message with meaningful content — the reply should dispatch with

4220+

// the quoted text in the body.

4221+

mockShouldComputeCommandAuthorized.mockReturnValue(false);

4222+

mockGetMessageFeishu.mockResolvedValueOnce({

4223+

messageId: "om_group_quoted_001",

4224+

chatId: "oc-group-90177",

4225+

content: "parent message with context",

4226+

contentType: "text",

4227+

});

4228+
4229+

const cfg: ClawdbotConfig = {

4230+

channels: {

4231+

feishu: {

4232+

groupPolicy: "open",

4233+

groups: {

4234+

"oc-group-90177": {

4235+

requireMention: true,

4236+

},

4237+

},

4238+

},

4239+

},

4240+

} as ClawdbotConfig;

4241+
4242+

const event: FeishuMessageEvent = {

4243+

sender: {

4244+

sender_id: {

4245+

open_id: "ou-group-sender",

4246+

},

4247+

},

4248+

message: {

4249+

message_id: "msg-group-empty-with-quote",

4250+

parent_id: "om_group_quoted_001",

4251+

chat_id: "oc-group-90177",

4252+

chat_type: "group",

4253+

message_type: "text",

4254+

// Empty text — only @bot mention, no additional content

4255+

content: JSON.stringify({ text: "" }),

4256+

// Bot mention so the message passes the requireMention gate

4257+

mentions: [

4258+

{ key: "@_bot_1", id: { open_id: "ou-bot-90177" }, name: "Bot", tenant_key: "" },

4259+

],

4260+

},

4261+

};

4262+
4263+

await dispatchMessage({ cfg, event, botOpenId: "ou-bot-90177" });

4264+
4265+

expect(mockDispatchReplyFromConfig).toHaveBeenCalledTimes(1);

4266+

const context = mockCallArg<{ Body?: string }>(mockFinalizeInboundContext, 0, 0);

4267+

expect(context.Body).toContain("[Replying to:");

4268+

expect(context.Body).toContain("parent message with context");

4269+

});

4270+
4271+

it("does not over-fetch quoted message for unmentioned empty reply in requireMention:true group (#90177)", async () => {

4272+

// An empty-text reply that quotes a parent but does NOT mention the bot

4273+

// in a requireMention:true group should be rejected at the mention gate

4274+

// before the quoted message is fetched, so getMessageFeishu is never

4275+

// called and nothing is dispatched.

4276+

mockShouldComputeCommandAuthorized.mockReturnValue(false);

4277+
4278+

const cfg: ClawdbotConfig = {

4279+

channels: {

4280+

feishu: {

4281+

groupPolicy: "open",

4282+

groups: {

4283+

"oc-group-90177-neg": {

4284+

requireMention: true,

4285+

},

4286+

},

4287+

},

4288+

},

4289+

} as ClawdbotConfig;

4290+
4291+

const event: FeishuMessageEvent = {

4292+

sender: {

4293+

sender_id: {

4294+

open_id: "ou-group-sender-neg",

4295+

},

4296+

},

4297+

message: {

4298+

message_id: "msg-group-unmentioned-empty-quote",

4299+

parent_id: "om_group_quoted_neg",

4300+

chat_id: "oc-group-90177-neg",

4301+

chat_type: "group",

4302+

message_type: "text",

4303+

// Empty text with no bot mention

4304+

content: JSON.stringify({ text: "" }),

4305+

},

4306+

};

4307+
4308+

await dispatchMessage({ cfg, event, botOpenId: "ou-bot-90177-neg" });

4309+
4310+

expect(mockGetMessageFeishu).not.toHaveBeenCalled();

4311+

expect(mockDispatchReplyFromConfig).not.toHaveBeenCalled();

4312+

});

41674313

});

41684314
41694315

describe("createFeishuMessageReceiveHandler media dedupe", () => {

Original file line numberDiff line numberDiff line change

@@ -1026,15 +1026,57 @@ export async function handleFeishuMessage(params: {

10261026

log,

10271027

accountId: account.accountId,

10281028

});

1029-

// Skip messages with no text content and no media attachments. Feishu can

1030-

// deliver empty-text events (e.g. `{"text":""}`) when a user sends a blank

1031-

// message or when media parsing produces an empty string. Writing a blank

1032-

// user turn to the session causes downstream LLM providers (e.g. MiniMax)

1033-

// to reject the request with "messages must not be empty" errors. Logging

1034-

// the skip avoids silent loss without polluting the agent session.

1035-

if (!ctx.content.trim() && mediaList.length === 0) {

1029+

// Fetch quoted/replied message content before the empty-message guard

1030+

// so a reply with only @bot (no text, no media) is not dropped when

1031+

// the quoted message carries meaningful content.

1032+

let quotedMessageInfo: Awaited<ReturnType<typeof getMessageFeishu>> = null;

1033+

let quotedContent: string | undefined;

1034+

if (ctx.parentId) {

1035+

try {

1036+

quotedMessageInfo = await getMessageFeishu({

1037+

cfg,

1038+

messageId: ctx.parentId,

1039+

accountId: account.accountId,

1040+

});

1041+

if (

1042+

quotedMessageInfo &&

1043+

(await shouldIncludeFetchedGroupContextMessage({

1044+

cfg,

1045+

accountId: account.accountId,

1046+

chatId: ctx.chatId,

1047+

isGroup,

1048+

allowFrom: effectiveGroupSenderAllowFrom,

1049+

mode: contextVisibilityMode,

1050+

kind: "quote",

1051+

senderId: quotedMessageInfo.senderId,

1052+

senderType: quotedMessageInfo.senderType,

1053+

}))

1054+

) {

1055+

quotedContent = quotedMessageInfo.content;

1056+

log(

1057+

`feishu[${account.accountId}]: fetched quoted message: ${quotedContent?.slice(0, 100)}`,

1058+

);

1059+

} else if (quotedMessageInfo) {

1060+

log(

1061+

`feishu[${account.accountId}]: skipped quoted message from sender ${quotedMessageInfo.senderId ?? "unknown"} (mode=${contextVisibilityMode})`,

1062+

);

1063+

}

1064+

} catch (err) {

1065+

log(`feishu[${account.accountId}]: failed to fetch quoted message: ${String(err)}`);

1066+

}

1067+

}

1068+
1069+

// Skip messages with no text content, no media attachments, and no quoted

1070+

// content. Feishu can deliver empty-text events (e.g. `{"text":""}`) when

1071+

// a user sends a blank message or when media parsing produces an empty

1072+

// string. Writing a blank user turn to the session causes downstream LLM

1073+

// providers (e.g. MiniMax) to reject the request with "messages must not

1074+

// be empty" errors. Logging the skip avoids silent loss without polluting

1075+

// the agent session. Quoted content is checked too so a reply-only @bot

1076+

// with quoted context is not dropped.

1077+

if (!ctx.content.trim() && mediaList.length === 0 && !quotedContent?.trim()) {

10361078

log(

1037-

`feishu[${account.accountId}]: skipping empty message (no text, no media) from ${ctx.senderOpenId}`,

1079+

`feishu[${account.accountId}]: skipping empty message (no text, no media, no quoted) from ${ctx.senderOpenId}`,

10381080

);

10391081

return;

10401082

}

@@ -1107,44 +1149,6 @@ export async function handleFeishuMessage(params: {

11071149

).commandAccess.authorized

11081150

: undefined;

11091151
1110-

// Fetch quoted/replied message content if parentId exists

1111-

let quotedMessageInfo: Awaited<ReturnType<typeof getMessageFeishu>> = null;

1112-

let quotedContent: string | undefined;

1113-

if (ctx.parentId) {

1114-

try {

1115-

quotedMessageInfo = await getMessageFeishu({

1116-

cfg,

1117-

messageId: ctx.parentId,

1118-

accountId: account.accountId,

1119-

});

1120-

if (

1121-

quotedMessageInfo &&

1122-

(await shouldIncludeFetchedGroupContextMessage({

1123-

cfg,

1124-

accountId: account.accountId,

1125-

chatId: ctx.chatId,

1126-

isGroup,

1127-

allowFrom: effectiveGroupSenderAllowFrom,

1128-

mode: contextVisibilityMode,

1129-

kind: "quote",

1130-

senderId: quotedMessageInfo.senderId,

1131-

senderType: quotedMessageInfo.senderType,

1132-

}))

1133-

) {

1134-

quotedContent = quotedMessageInfo.content;

1135-

log(

1136-

`feishu[${account.accountId}]: fetched quoted message: ${quotedContent?.slice(0, 100)}`,

1137-

);

1138-

} else if (quotedMessageInfo) {

1139-

log(

1140-

`feishu[${account.accountId}]: skipped quoted message from sender ${quotedMessageInfo.senderId ?? "unknown"} (mode=${contextVisibilityMode})`,

1141-

);

1142-

}

1143-

} catch (err) {

1144-

log(`feishu[${account.accountId}]: failed to fetch quoted message: ${String(err)}`);

1145-

}

1146-

}

1147-
11481152

const isTopicSessionForThread =

11491153

isGroup &&

11501154

(groupSession?.groupSessionScope === "group_topic" ||