Outbound: skip broadcast channel scan when channel is explicit
This commit is contained in:
parent
b71686ab44
commit
5e417b44e1
@ -318,14 +318,16 @@ async function handleBroadcastAction(
|
|||||||
throw new Error("Broadcast requires at least one target in --targets.");
|
throw new Error("Broadcast requires at least one target in --targets.");
|
||||||
}
|
}
|
||||||
const channelHint = readStringParam(params, "channel");
|
const channelHint = readStringParam(params, "channel");
|
||||||
const configured = await listConfiguredMessageChannels(input.cfg);
|
|
||||||
if (configured.length === 0) {
|
|
||||||
throw new Error("Broadcast requires at least one configured channel.");
|
|
||||||
}
|
|
||||||
const targetChannels =
|
const targetChannels =
|
||||||
channelHint && channelHint.trim().toLowerCase() !== "all"
|
channelHint && channelHint.trim().toLowerCase() !== "all"
|
||||||
? [await resolveChannel(input.cfg, { channel: channelHint }, input.toolContext)]
|
? [await resolveChannel(input.cfg, { channel: channelHint }, input.toolContext)]
|
||||||
: configured;
|
: await (async () => {
|
||||||
|
const configured = await listConfiguredMessageChannels(input.cfg);
|
||||||
|
if (configured.length === 0) {
|
||||||
|
throw new Error("Broadcast requires at least one configured channel.");
|
||||||
|
}
|
||||||
|
return configured;
|
||||||
|
})();
|
||||||
const results: Array<{
|
const results: Array<{
|
||||||
channel: ChannelId;
|
channel: ChannelId;
|
||||||
to: string;
|
to: string;
|
||||||
|
|||||||
4
test/fixtures/test-parallel.behavior.json
vendored
4
test/fixtures/test-parallel.behavior.json
vendored
@ -333,6 +333,10 @@
|
|||||||
"file": "src/infra/outbound/message-action-runner.poll.test.ts",
|
"file": "src/infra/outbound/message-action-runner.poll.test.ts",
|
||||||
"reason": "Terminates cleanly under threads, but not process forks on this host."
|
"reason": "Terminates cleanly under threads, but not process forks on this host."
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"file": "src/infra/outbound/message-action-runner.context.test.ts",
|
||||||
|
"reason": "Terminates cleanly under threads, but not process forks on this host."
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"file": "src/tts/tts.test.ts",
|
"file": "src/tts/tts.test.ts",
|
||||||
"reason": "Terminates cleanly under threads, but not process forks on this host."
|
"reason": "Terminates cleanly under threads, but not process forks on this host."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user