fix: make forwardToStorage fully dynamic based on fileType
- Replace forceDocument boolean with fileType string in forwardToStorage - Dynamically call matching sendPhoto, sendAudio, sendVideo, sendVoice, sendAnimation, sendSticker, or sendDocument Telegraf API method - Correctly extract uploaded file details based on what Telegram returned - Fixes IMAGE_PROCESS_FAILED 500 error when uploading ogg audio, video, sticker, or voice notes via HTTP - Update upload.ts, bot.ts, and test suites to match the new dynamic signature Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
bf6d5f04c4
commit
525348b1f3
+1
-1
@@ -96,7 +96,7 @@ export const startBot = async (): Promise<Telegraf<Context>> => {
|
||||
return;
|
||||
}
|
||||
|
||||
const result = await forwardToStorage(file_id, fileName);
|
||||
const result = await forwardToStorage(file_id, fileName, fileType);
|
||||
const publicId = nanoid();
|
||||
|
||||
const uploaded = {
|
||||
|
||||
Reference in New Issue
Block a user