We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f19c5b4 commit 0c420fbCopy full SHA for 0c420fb
apps/sim/tools/telegram/send_document.ts
@@ -48,10 +48,15 @@ export const telegramSendDocumentTool: ToolConfig<
48
'Content-Type': 'application/json',
49
}),
50
body: (params: TelegramSendDocumentParams) => {
51
+ let normalizedFiles: unknown[] | null = null
52
+ if (params.files) {
53
+ normalizedFiles = Array.isArray(params.files) ? params.files : [params.files]
54
+ }
55
+
56
return {
57
botToken: params.botToken,
58
chatId: params.chatId,
- files: params.files || null,
59
+ files: normalizedFiles,
60
caption: params.caption,
61
}
62
},
0 commit comments