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

推荐订阅源

S
SegmentFault 最新的问题
B
Blog
P
Proofpoint News Feed
美团技术团队
The GitHub Blog
The GitHub Blog
Y
Y Combinator Blog
A
About on SuperTechFans
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Vercel News
Vercel News
有赞技术团队
有赞技术团队
小众软件
小众软件
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Google DeepMind News
Google DeepMind News
Martin Fowler
Martin Fowler
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
aimingoo的专栏
aimingoo的专栏
H
Help Net Security
罗磊的独立博客
L
LangChain Blog
GbyAI
GbyAI
腾讯CDC
T
The Blog of Author Tim Ferriss
Microsoft Security Blog
Microsoft Security 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(whatsapp): quote current follow-up in durable replies...
mcaxtr · 2026-06-24 · via Recent Commits to openclaw:main

File tree

  • extensions/whatsapp/src/auto-reply/monitor

Original file line numberDiff line numberDiff line change

@@ -743,8 +743,13 @@ describe("whatsapp inbound dispatch", () => {

743743

expectedReplyToId: "trigger-message",

744744

},

745745

{

746-

name: "blocks durable fallback without a final payload reply target",

746+

name: "quotes the current user follow-up without falling back to the quoted bot message",

747747

payload: { text: "final payload" },

748+

expectedReplyToId: "trigger-message",

749+

},

750+

{

751+

name: "preserves explicit null reply targets",

752+

payload: { text: "final payload", replyToId: null },

748753

expectedReplyToId: null,

749754

},

750755

] satisfies Array<{

Original file line numberDiff line numberDiff line change

@@ -111,6 +111,10 @@ function whatsAppReplyDeliveryVisibilityFromDurableResult(result: {

111111

return whatsAppReplyDeliveryVisibility(result.visibleReplySent === true);

112112

}

113113
114+

function readTrimmedString(value: unknown): string {

115+

return typeof value === "string" ? value.trim() : "";

116+

}

117+
114118

function markWhatsAppReplyDeliveryErrorVisibleAfterFlush(

115119

error: unknown,

116120

flushResult: WhatsAppMediaOnlyFlushResult,

@@ -141,6 +145,29 @@ function logWhatsAppReplyDeliveryError(params: {

141145

);

142146

}

143147
148+

function resolveWhatsAppDurableReplyToId(params: {

149+

context: Record<string, unknown>;

150+

info: ReplyDeliveryInfo;

151+

msg: AdmittedWebInboundMessage;

152+

payload: DeliverableWhatsAppOutboundPayload<ReplyPayload>;

153+

}): string | null {

154+

if (params.payload.replyToId === null) {

155+

return null;

156+

}

157+

const explicitPayloadReplyToId = readTrimmedString(params.payload.replyToId);

158+

if (explicitPayloadReplyToId) {

159+

return explicitPayloadReplyToId;

160+

}

161+

const hasVisibleInboundReplyTarget =

162+

Boolean(readTrimmedString(params.context.ReplyToId)) ||

163+

Boolean(readTrimmedString(params.context.ReplyToIdFull));

164+

const currentInboundMessageId = readTrimmedString(params.msg.event.id);

165+

if (params.info.kind === "final" && hasVisibleInboundReplyTarget && currentInboundMessageId) {

166+

return currentInboundMessageId;

167+

}

168+

return null;

169+

}

170+
144171

function resolveWhatsAppDisableBlockStreaming(cfg: ReturnType<LoadConfigFn>): boolean | undefined {

145172

if (typeof cfg.channels?.whatsapp?.blockStreaming !== "boolean") {

146173

return undefined;

@@ -691,7 +718,12 @@ export async function dispatchWhatsAppBufferedReply(params: {

691718

payload: normalizedDeliveryPayload,

692719

info,

693720

to: conversationId,

694-

replyToId: normalizedDeliveryPayload.replyToId ?? null,

721+

replyToId: resolveWhatsAppDurableReplyToId({

722+

context: params.context,

723+

info,

724+

msg: params.msg,

725+

payload: normalizedDeliveryPayload,

726+

}),

695727

formatting: {

696728

textLimit,

697729

tableMode,