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

推荐订阅源

月光博客
月光博客
小众软件
小众软件
爱范儿
爱范儿
Y
Y Combinator Blog
博客园 - Franky
美团技术团队
博客园 - 【当耐特】
The Cloudflare Blog
罗磊的独立博客
Hugging Face - Blog
Hugging Face - Blog
Jina AI
Jina AI
IT之家
IT之家
人人都是产品经理
人人都是产品经理
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 聂微东
WordPress大学
WordPress大学
V
Visual Studio Blog
博客园_首页
阮一峰的网络日志
阮一峰的网络日志
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(auto-reply): keep docking in direct chats · openclaw/...
vincentkoc · 2026-05-01 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

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

3535

- Slack/slash commands: send block-only slash command replies instead of dropping Slack block payloads with no plain-text fallback. Thanks @vincentkoc.

3636

- Telegram/messages: derive fallback text from interactive button/select labels before sending button-only payloads, so Telegram replies are not rejected as empty messages. Thanks @vincentkoc.

3737

- LINE/messages: send quick-reply-only payloads with fallback option text instead of accepting the payload and returning an empty delivery. Thanks @vincentkoc.

38+

- Auto-reply/docking: require `/dock-*` route switches to start from direct chats, so group or channel participants cannot reroute a shared session's future replies into a linked DM. Thanks @vincentkoc.

3839

- Gateway/agent: reject strict `openclaw agent --deliver` requests with missing delivery targets before starting the agent run, so users do not wait for a completed turn that cannot send anywhere. Thanks @vincentkoc.

3940

- Setup/import: honor non-interactive `--import-from` onboarding flags by running the migration import path instead of silently completing normal setup without importing anything. Thanks @vincentkoc.

4041

- Discord/voice: run voice-channel turns under a voice-output policy that hides the agent `tts` tool and asks for spoken reply text, so `/vc join` sessions synthesize and play agent replies instead of ending with `NO_REPLY`. Fixes #61536. Thanks @aounakram.

Original file line numberDiff line numberDiff line change

@@ -55,6 +55,7 @@ function buildDockParams(commandBody: string, ctxOverrides?: Partial<MsgContext>

5555

Provider: "telegram",

5656

Surface: "telegram",

5757

OriginatingChannel: "telegram",

58+

ChatType: "direct",

5859

SenderId: "42",

5960

From: "42",

6061

...ctxOverrides,

@@ -121,6 +122,25 @@ describe("handleDockCommand", () => {

121122

expect(params.sessionEntry?.lastChannel).toBe("telegram");

122123

});

123124
125+

it("rejects group-session docking before it can reroute replies to a linked DM", async () => {

126+

const params = buildDockParams("/dock-discord", {

127+

ChatType: "group",

128+

From: "telegram:group:-100123",

129+

To: "telegram:-100123",

130+

OriginatingTo: "telegram:-100123",

131+

SenderId: "42",

132+

});

133+
134+

const result = await handleDockCommand(params, true);

135+
136+

expect(result).toEqual({

137+

shouldContinue: false,

138+

reply: { text: "Cannot dock to discord: docking is only available from direct chats." },

139+

});

140+

expect(params.sessionEntry?.lastChannel).toBe("telegram");

141+

expect(params.sessionEntry?.lastTo).toBe("42");

142+

});

143+
124144

it("fails closed when no session entry can be persisted", async () => {

125145

const params = buildDockParams("/dock-discord");

126146

params.sessionEntry = undefined;

Original file line numberDiff line numberDiff line change

@@ -38,6 +38,10 @@ function resolveTargetChannelAccountId(

3838

return normalizeOptionalString(plugin?.config.defaultAccountId?.(params.cfg)) || "default";

3939

}

4040
41+

function isDirectDockSource(params: HandleCommandsParams): boolean {

42+

return normalizeLowercaseStringOrEmpty(params.ctx.ChatType) === "direct";

43+

}

44+
4145

function collectSourcePeerCandidates(params: HandleCommandsParams): string[] {

4246

return [

4347

params.ctx.NativeDirectUserId,

@@ -126,6 +130,14 @@ export const handleDockCommand: CommandHandler = async (params, allowTextCommand

126130

reply: { text: `Already docked to ${targetChannel}.` },

127131

};

128132

}

133+

if (!isDirectDockSource(params)) {

134+

return {

135+

shouldContinue: false,

136+

reply: {

137+

text: `Cannot dock to ${targetChannel}: docking is only available from direct chats.`,

138+

},

139+

};

140+

}

129141
130142

const sourceCandidates = buildSourceIdentityCandidates(params, sourceChannel);

131143

if (sourceCandidates.size === 0) {