

























@@ -87,13 +87,15 @@ describe("resolveSourceReplyDeliveryMode", () => {
8787).toBe("automatic");
8888});
898990-it("treats native commands as explicit replies in groups", () => {
91-expect(
92-resolveSourceReplyDeliveryMode({
93-cfg: emptyConfig,
94-ctx: { ChatType: "group", CommandSource: "native" },
95-}),
96-).toBe("automatic");
90+it("treats native and text commands as explicit replies in groups", () => {
91+for (const CommandSource of ["native", "text"] as const) {
92+expect(
93+resolveSourceReplyDeliveryMode({
94+cfg: emptyConfig,
95+ctx: { ChatType: "group", CommandSource },
96+}),
97+).toBe("automatic");
98+}
9799});
9810099101it("falls back to automatic when message tool is unavailable", () => {
@@ -177,20 +179,22 @@ describe("resolveSourceReplyVisibilityPolicy", () => {
177179});
178180});
179181180-it("keeps native command replies visible in groups", () => {
181-expect(
182-resolveSourceReplyVisibilityPolicy({
183-cfg: emptyConfig,
184-ctx: { ChatType: "group", CommandSource: "native" },
185-sendPolicy: "allow",
186-}),
187-).toMatchObject({
188-sourceReplyDeliveryMode: "automatic",
189-suppressAutomaticSourceDelivery: false,
190-suppressDelivery: false,
191-suppressHookReplyLifecycle: false,
192-suppressTyping: false,
193-});
182+it("keeps native and text command replies visible in groups", () => {
183+for (const CommandSource of ["native", "text"] as const) {
184+expect(
185+resolveSourceReplyVisibilityPolicy({
186+cfg: emptyConfig,
187+ctx: { ChatType: "group", CommandSource },
188+sendPolicy: "allow",
189+}),
190+).toMatchObject({
191+sourceReplyDeliveryMode: "automatic",
192+suppressAutomaticSourceDelivery: false,
193+suppressDelivery: false,
194+suppressHookReplyLifecycle: false,
195+suppressTyping: false,
196+});
197+}
194198});
195199196200it("keeps configured automatic group delivery visible", () => {
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。