diff --git a/src/channels/plugins/index.ts b/src/channels/plugins/index.ts index a83d14186..c3611056d 100644 --- a/src/channels/plugins/index.ts +++ b/src/channels/plugins/index.ts @@ -83,6 +83,5 @@ export { listTelegramDirectoryPeersFromConfig, listWhatsAppDirectoryGroupsFromConfig, listWhatsAppDirectoryPeersFromConfig, - type DirectoryConfigParams, } from "./directory-config.js"; export type { ChannelId, ChannelPlugin } from "./types.js"; diff --git a/src/infra/outbound/target-errors.ts b/src/infra/outbound/target-errors.ts index f6d303cb9..76b12e985 100644 --- a/src/infra/outbound/target-errors.ts +++ b/src/infra/outbound/target-errors.ts @@ -1,5 +1,3 @@ -import { formatTargetHint } from "./target-format.js"; - export function missingTargetMessage(provider: string, hint?: string): string { return `Delivering to ${provider} requires target${formatTargetHint(hint)}`; } @@ -23,3 +21,8 @@ export function unknownTargetMessage(provider: string, raw: string, hint?: strin export function unknownTargetError(provider: string, raw: string, hint?: string): Error { return new Error(unknownTargetMessage(provider, raw, hint)); } + +function formatTargetHint(hint?: string, withLabel = false): string { + if (!hint) return ""; + return withLabel ? ` Hint: ${hint}` : ` ${hint}`; +}