refactor: centralize ack reaction removal

This commit is contained in:
Peter Steinberger
2026-01-23 22:29:47 +00:00
parent ed05152cb1
commit cb8c8fee9a
10 changed files with 140 additions and 62 deletions

View File

@@ -2,7 +2,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import type { IncomingMessage, ServerResponse } from "node:http";
import { EventEmitter } from "node:events";
import { shouldAckReaction } from "clawdbot/plugin-sdk";
import { removeAckReactionAfterReply, shouldAckReaction } from "clawdbot/plugin-sdk";
import type { ClawdbotConfig, PluginRuntime } from "clawdbot/plugin-sdk";
import {
handleBlueBubblesWebhookRequest,
@@ -138,6 +138,7 @@ function createMockRuntime(): PluginRuntime {
},
reactions: {
shouldAckReaction,
removeAckReactionAfterReply,
},
groups: {
resolveGroupPolicy: mockResolveGroupPolicy as unknown as PluginRuntime["channel"]["groups"]["resolveGroupPolicy"],