

















11// Tests reply payload helper behavior and delivery metadata.
2-import { describe, expect, it, vi } from "vitest";
2+import { describe, expect, it } from "vitest";
33import { resetPluginRuntimeStateForTest, setActivePluginRegistry } from "../../plugins/runtime.js";
44import { createOutboundTestPlugin, createTestRegistry } from "../../test-utils/channel-plugins.js";
55import { getReplyPayloadMetadata, setReplyPayloadMetadata } from "../reply-payload.js";
@@ -26,17 +26,6 @@ function targetsMatchTelegramReplySuppression(params: {
2626);
2727}
282829-vi.mock("../../channels/plugins/bundled.js", () => ({
30-getBundledChannelPlugin: (channel: string) =>
31-channel === "telegram"
32- ? {
33-outbound: {
34-targetsMatchForReplySuppression: targetsMatchTelegramReplySuppression,
35-},
36-}
37- : undefined,
38-}));
39-4029describe("filterMessagingToolMediaDuplicates", () => {
4130it("strips mediaUrl when it matches sentMediaUrls", () => {
4231const result = filterMessagingToolMediaDuplicates({
@@ -262,7 +251,7 @@ describe("shouldDedupeMessagingToolRepliesForRoute", () => {
262251).toBe(true);
263252});
264253265-it("matches telegram replies even when the active plugin registry omits telegram", () => {
254+it("uses generic route matching when the active plugin registry omits telegram", () => {
266255resetPluginRuntimeStateForTest();
267256setActivePluginRegistry(createTestRegistry([]));
268257@@ -274,7 +263,7 @@ describe("shouldDedupeMessagingToolRepliesForRoute", () => {
274263{ tool: "message", provider: "telegram", to: "-100123", threadId: "77" },
275264],
276265}),
277-).toBe(true);
266+).toBe(false);
278267});
279268});
280269此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。