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

推荐订阅源

S
SegmentFault 最新的问题
Jina AI
Jina AI
罗磊的独立博客
V
Visual Studio Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
J
Java Code Geeks
U
Unit 42
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog RSS Feed
爱范儿
爱范儿
酷 壳 – CoolShell
酷 壳 – CoolShell
Last Week in AI
Last Week in AI
T
The Blog of Author Tim Ferriss
腾讯CDC
Hugging Face - Blog
Hugging Face - Blog
T
Tailwind CSS Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
I
InfoQ
月光博客
月光博客
博客园_首页
Vercel News
Vercel News
P
Proofpoint News Feed
GbyAI
GbyAI
Y
Y Combinator 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): remove ack reactions after replies · openc...
steipete · 2026-04-26 · via Recent Commits to openclaw:main

@@ -1,4 +1,8 @@

1-

import { shouldAckReactionForWhatsApp } from "openclaw/plugin-sdk/channel-feedback";

1+

import {

2+

createAckReactionHandle,

3+

shouldAckReactionForWhatsApp,

4+

type AckReactionHandle,

5+

} from "openclaw/plugin-sdk/channel-feedback";

26

import type { loadConfig } from "openclaw/plugin-sdk/config-runtime";

37

import { logVerbose } from "openclaw/plugin-sdk/runtime-env";

48

import { getSenderIdentity } from "../../identity.js";

@@ -18,9 +22,9 @@ export async function maybeSendAckReaction(params: {

1822

accountId?: string;

1923

info: (obj: unknown, msg: string) => void;

2024

warn: (obj: unknown, msg: string) => void;

21-

}) {

25+

}): Promise<AckReactionHandle | null> {

2226

if (!params.msg.id) {

23-

return;

27+

return null;

2428

}

25292630

// Keep ackReaction as the emoji/scope control, while letting reactionLevel

@@ -30,7 +34,7 @@ export async function maybeSendAckReaction(params: {

3034

accountId: params.accountId,

3135

});

3236

if (reactionLevel.level === "off") {

33-

return;

37+

return null;

3438

}

35393640

const ackConfig = params.cfg.channels?.whatsapp?.ackReaction;

@@ -61,29 +65,35 @@ export async function maybeSendAckReaction(params: {

6165

});

62666367

if (!shouldSendReaction()) {

64-

return;

68+

return null;

6569

}

66706771

params.info(

6872

{ chatId: params.msg.chatId, messageId: params.msg.id, emoji },

6973

"sending ack reaction",

7074

);

7175

const sender = getSenderIdentity(params.msg);

72-

sendReactionWhatsApp(params.msg.chatId, params.msg.id, emoji, {

76+

const reactionOptions = {

7377

verbose: params.verbose,

7478

fromMe: false,

75-

participant: sender.jid ?? undefined,

76-

accountId: params.accountId,

79+

...(sender.jid ? { participant: sender.jid } : {}),

80+

...(params.accountId ? { accountId: params.accountId } : {}),

7781

cfg: params.cfg,

78-

}).catch((err) => {

79-

params.warn(

80-

{

81-

error: formatError(err),

82-

chatId: params.msg.chatId,

83-

messageId: params.msg.id,

84-

},

85-

"failed to send ack reaction",

86-

);

87-

logVerbose(`WhatsApp ack reaction failed for chat ${params.msg.chatId}: ${formatError(err)}`);

82+

};

83+

return createAckReactionHandle({

84+

ackReactionValue: emoji,

85+

send: () => sendReactionWhatsApp(params.msg.chatId, params.msg.id!, emoji, reactionOptions),

86+

remove: () => sendReactionWhatsApp(params.msg.chatId, params.msg.id!, "", reactionOptions),

87+

onSendError: (err) => {

88+

params.warn(

89+

{

90+

error: formatError(err),

91+

chatId: params.msg.chatId,

92+

messageId: params.msg.id,

93+

},

94+

"failed to send ack reaction",

95+

);

96+

logVerbose(`WhatsApp ack reaction failed for chat ${params.msg.chatId}: ${formatError(err)}`);

97+

},

8898

});

8999

}