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

推荐订阅源

U
Unit 42
博客园 - 司徒正美
V
Visual Studio Blog
博客园 - 【当耐特】
T
Tailwind CSS Blog
美团技术团队
博客园 - 叶小钗
Jina AI
Jina AI
宝玉的分享
宝玉的分享
IT之家
IT之家
Hugging Face - Blog
Hugging Face - Blog
雷峰网
雷峰网
Stack Overflow Blog
Stack Overflow Blog
博客园_首页
人人都是产品经理
人人都是产品经理
T
The Blog of Author Tim Ferriss
P
Proofpoint News Feed
Microsoft Security Blog
Microsoft Security Blog
Y
Y Combinator Blog
GbyAI
GbyAI
大猫的无限游戏
大猫的无限游戏
Martin Fowler
Martin Fowler
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
腾讯CDC

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(imessage): continue polling after denied reactions · ...
steipete · 2026-05-28 · via Recent Commits to openclaw:main

@@ -24,6 +24,9 @@ type IMessageApprovalReactionResolution = {

2424

approvalId: string;

2525

decision: ExecApprovalReplyDecision;

2626

};

27+

export type IMessageApprovalReactionHandleResult =

28+

| { handled: false; stopPolling: false }

29+

| { handled: true; stopPolling: boolean };

27302831

type IMessageApprovalReactionTarget = ApprovalReactionTargetRecord;

2932

@@ -469,25 +472,25 @@ function readApprovalReactionEvent(

469472

};

470473

}

471474472-

export async function maybeResolveIMessageApprovalReaction(params: {

475+

export async function handleIMessageApprovalReaction(params: {

473476

cfg: OpenClawConfig;

474477

accountId: string;

475478

message: IMessagePayload;

476479

bodyText: string;

477480

gatewayUrl?: string;

478481

logVerboseMessage?: (message: string) => void;

479-

}): Promise<boolean> {

482+

}): Promise<IMessageApprovalReactionHandleResult> {

480483

const event = readApprovalReactionEvent(params.message, params.bodyText);

481484

if (!event) {

482-

return false;

485+

return { handled: false, stopPolling: false };

483486

}

484487

// A removed tapback (user un-taps 👍 or switches to a different emoji) is

485488

// intentionally NOT a fresh resolve. We only want to clear the binding so

486489

// the next added-tapback resolves freshly. Falling through to `return false`

487490

// would surface the un-tap as a noisy reaction system event; instead we

488491

// own the event and stay quiet.

489492

if (event.action === "removed") {

490-

return false;

493+

return { handled: false, stopPolling: false };

491494

}

492495

let target: IMessageApprovalReactionResolution | null = null;

493496

let matchedMessageId: string | null = null;

@@ -504,7 +507,7 @@ export async function maybeResolveIMessageApprovalReaction(params: {

504507

}

505508

}

506509

if (!target) {

507-

return false;

510+

return { handled: false, stopPolling: false };

508511

}

509512510513

const approvalKind = target.approvalId.startsWith("plugin:") ? "plugin" : "exec";

@@ -513,7 +516,7 @@ export async function maybeResolveIMessageApprovalReaction(params: {

513516

params.logVerboseMessage?.(

514517

`imessage: approval reaction denied id=${target.approvalId}; reactions require explicit approvers`,

515518

);

516-

return true;

519+

return { handled: true, stopPolling: false };

517520

}

518521

const auth = imessageApprovalAuth.authorizeActorAction({

519522

cfg: params.cfg,

@@ -526,7 +529,7 @@ export async function maybeResolveIMessageApprovalReaction(params: {

526529

params.logVerboseMessage?.(

527530

`imessage: approval reaction denied id=${target.approvalId} sender=${event.actorHandle}`,

528531

);

529-

return true;

532+

return { handled: true, stopPolling: false };

530533

}

531534532535

const { isApprovalNotFoundError, resolveIMessageApproval } = await loadApprovalResolver();

@@ -552,7 +555,7 @@ export async function maybeResolveIMessageApprovalReaction(params: {

552555

params.logVerboseMessage?.(

553556

`imessage: approval reaction resolved id=${target.approvalId} sender=${event.actorHandle} decision=${target.decision} via messageId=${matchedMessageId ?? event.messageId}`,

554557

);

555-

return true;

558+

return { handled: true, stopPolling: true };

556559

} catch (error) {

557560

if (isApprovalNotFoundError(error)) {

558561

for (const candidate of event.messageIdCandidates) {

@@ -565,7 +568,7 @@ export async function maybeResolveIMessageApprovalReaction(params: {

565568

params.logVerboseMessage?.(

566569

`imessage: approval reaction ignored for expired approval id=${target.approvalId} sender=${event.actorHandle}`,

567570

);

568-

return true;

571+

return { handled: true, stopPolling: true };

569572

}

570573

// Surface non-NotFound errors at warn level so a gateway 5xx / network

571574

// outage / auth failure is visible without OPENCLAW_LOG_LEVEL=debug.

@@ -583,10 +586,21 @@ export async function maybeResolveIMessageApprovalReaction(params: {

583586

params.logVerboseMessage?.(

584587

`imessage: approval reaction failed id=${target.approvalId} sender=${event.actorHandle}: ${String(error)}`,

585588

);

586-

return true;

589+

return { handled: true, stopPolling: true };

587590

}

588591

}

589592593+

export async function maybeResolveIMessageApprovalReaction(params: {

594+

cfg: OpenClawConfig;

595+

accountId: string;

596+

message: IMessagePayload;

597+

bodyText: string;

598+

gatewayUrl?: string;

599+

logVerboseMessage?: (message: string) => void;

600+

}): Promise<boolean> {

601+

return (await handleIMessageApprovalReaction(params)).handled;

602+

}

603+590604

export function clearIMessageApprovalReactionTargetsForTest(): void {

591605

imessageApprovalReactionTargets.clearForTest();

592606

pendingReactionPollTargets.clear();