@@ -232,6 +232,8 @@ describe("discordPlugin outbound", () => {
232232 expect ( discordPlugin . actions ?. resolveExecutionMode ?.( { action : "thread-reply" as never } ) ) . toBe (
233233 "local" ,
234234 ) ;
235+ expect ( discordPlugin . actions ?. resolveExecutionMode ?.( { action : "poll" } ) ) . toBe ( "local" ) ;
236+ expect ( discordPlugin . actions ?. supportsAction ?.( { action : "poll" } ) ) . toBe ( false ) ;
235237 expect ( discordPlugin . actions ?. resolveExecutionMode ?.( { action : "channel-info" as never } ) ) . toBe (
236238 "gateway" ,
237239 ) ;
@@ -426,35 +428,6 @@ describe("discordPlugin outbound", () => {
426428 expect ( result . messageId ) . toBe ( "video-1" ) ;
427429 } ) ;
428430
429- it ( "threads poll sends through the thread target" , async ( ) => {
430- const sendPollDiscord = vi . fn ( async ( ) => discordTestSendResult ( "poll-1" ) ) ;
431- const sendPollSpy = vi . spyOn ( sendModule , "sendPollDiscord" ) . mockImplementation ( sendPollDiscord ) ;
432- try {
433- const result = await discordPlugin . outbound ! . sendPoll ! ( {
434- cfg : EMPTY_DISCORD_TEST_CONFIG ,
435- to : "channel:123" ,
436- poll : {
437- question : "Best shell?" ,
438- options : [ "molty" , "molter" ] ,
439- } ,
440- accountId : "work" ,
441- threadId : "thread-123" ,
442- } ) ;
443-
444- expect ( argAt ( sendPollDiscord , 0 , 0 ) ) . toBe ( "channel:thread-123" ) ;
445- expect ( argAt ( sendPollDiscord , 0 , 1 ) ) . toEqual ( {
446- question : "Best shell?" ,
447- options : [ "molty" , "molter" ] ,
448- } ) ;
449- expect ( objectArgAt ( sendPollDiscord , 0 , 2 ) . accountId ) . toBe ( "work" ) ;
450- const pollResult = result as { channel ?: string ; messageId ?: string } ;
451- expect ( pollResult . channel ) . toBe ( "discord" ) ;
452- expect ( pollResult . messageId ) . toBe ( "poll-1" ) ;
453- } finally {
454- sendPollSpy . mockRestore ( ) ;
455- }
456- } ) ;
457-
458431 it ( "forwards heartbeat typing through the run config and attached target" , async ( ) => {
459432 const sendTypingDiscord = vi . fn ( async ( ) => ( { ok : true , channelId : "thread-123" } ) ) ;
460433 const sendTypingSpy = vi
0 commit comments