@@ -87,13 +87,15 @@ describe("resolveSourceReplyDeliveryMode", () => {
8787 ) . toBe ( "automatic" ) ;
8888 } ) ;
8989
90- 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 } ) ;
98100
99101 it ( "falls back to automatic when message tool is unavailable" , ( ) => {
@@ -177,20 +179,22 @@ describe("resolveSourceReplyVisibilityPolicy", () => {
177179 } ) ;
178180 } ) ;
179181
180- 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 } ) ;
195199
196200 it ( "keeps configured automatic group delivery visible" , ( ) => {
0 commit comments