fix: forward forceDocument in channel.ts sendPayload (production path)

The telegramPlugin.outbound.sendPayload in channel.ts is the actual
production path used by the plugin registry. It was not forwarding
forceDocument, making the fix in outbound-adapter.ts ineffective.

- Add forceDocument to buildTelegramSendOptions params and output
- Destructure and pass forceDocument in sendPayload

Addresses Codex review on #46119.
This commit is contained in:
thepagent 2026-03-14 13:09:00 +00:00 committed by Frank Yang
parent 07bb655aa9
commit fe98d2614d
1 changed files with 4 additions and 0 deletions

View File

@ -96,6 +96,7 @@ function buildTelegramSendOptions(params: {
replyToId?: string | null;
threadId?: string | number | null;
silent?: boolean | null;
forceDocument?: boolean | null;
}): TelegramSendOptions {
return {
verbose: false,
@ -106,6 +107,7 @@ function buildTelegramSendOptions(params: {
replyToMessageId: parseTelegramReplyToMessageId(params.replyToId),
accountId: params.accountId ?? undefined,
silent: params.silent ?? undefined,
forceDocument: params.forceDocument ?? undefined,
};
}
@ -386,6 +388,7 @@ export const telegramPlugin: ChannelPlugin<ResolvedTelegramAccount, TelegramProb
replyToId,
threadId,
silent,
forceDocument,
}) => {
const send =
resolveOutboundSendDep<TelegramSendFn>(deps, "telegram") ??
@ -401,6 +404,7 @@ export const telegramPlugin: ChannelPlugin<ResolvedTelegramAccount, TelegramProb
replyToId,
threadId,
silent,
forceDocument,
}),
});
return { channel: "telegram", ...result };