From d38b232724375c1d7e0b11f31b6b95ff642fffa0 Mon Sep 17 00:00:00 2001 From: sheeek Date: Fri, 9 Jan 2026 23:47:50 +0100 Subject: [PATCH] chore: fix linting issues in ack-reaction feature - Remove unused mock variables in tests - Remove unused ackReactionScope variables in simple test cases - Fix line length for ackReactionScope declaration - All lint checks passing (0 warnings, 0 errors) - All tests passing (8/8) --- src/web/auto-reply.ack-reaction.test.ts | 8 -------- src/web/auto-reply.ts | 3 ++- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/web/auto-reply.ack-reaction.test.ts b/src/web/auto-reply.ack-reaction.test.ts index bad6a583f..96471ad76 100644 --- a/src/web/auto-reply.ack-reaction.test.ts +++ b/src/web/auto-reply.ack-reaction.test.ts @@ -2,12 +2,6 @@ import { beforeEach, describe, expect, it, vi } from "vitest"; import type { ClawdbotConfig } from "../config/types.js"; describe("WhatsApp ack reaction", () => { - const mockSendReaction = vi.fn(async () => {}); - const mockGetReply = vi.fn(async () => ({ - payloads: [{ text: "test reply" }], - meta: {}, - })); - beforeEach(() => { vi.clearAllMocks(); }); @@ -265,7 +259,6 @@ describe("WhatsApp ack reaction", () => { }; const ackReaction = (cfg.messages?.ackReaction ?? "").trim(); - const ackReactionScope = cfg.messages?.ackReactionScope ?? "group-mentions"; const didSendReply = false; // No reply sent const shouldAckReaction = () => { @@ -296,7 +289,6 @@ describe("WhatsApp ack reaction", () => { }; const ackReaction = (cfg.messages?.ackReaction ?? "").trim(); - const ackReactionScope = cfg.messages?.ackReactionScope ?? "group-mentions"; const didSendReply = true; const shouldAckReaction = () => { diff --git a/src/web/auto-reply.ts b/src/web/auto-reply.ts index 08552ad13..a0c769bfe 100644 --- a/src/web/auto-reply.ts +++ b/src/web/auto-reply.ts @@ -1389,7 +1389,8 @@ export async function monitorWebProvider( // Send ack reaction after successful reply const ackReaction = (cfg.messages?.ackReaction ?? "").trim(); - const ackReactionScope = cfg.messages?.ackReactionScope ?? "group-mentions"; + const ackReactionScope = + cfg.messages?.ackReactionScope ?? "group-mentions"; const shouldAckReaction = () => { if (!ackReaction) return false; if (!msg.id) return false;