From 0bc3bc241fcd20b87a1b5af39cee08b726b4aa93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=81=E6=9C=88=E6=9F=92?= <108160987+MarSeventh@users.noreply.github.com> Date: Sat, 6 Dec 2025 15:36:40 +0800 Subject: [PATCH] Refine GIF handling and update comments Update comments for clarity and adjust GIF handling logic. --- functions/upload/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/functions/upload/index.js b/functions/upload/index.js index c087c849..aad2eaed 100644 --- a/functions/upload/index.js +++ b/functions/upload/index.js @@ -422,10 +422,10 @@ async function uploadFileToTelegram(context, fullId, metadata, fileExt, fileName ? fileTypeMap[Object.keys(fileTypeMap).find(key => fileType.startsWith(key))] : defaultType; - // GIF 发送接口特殊处理 + // GIF ICO 等发送接口特殊处理 if (fileType === 'image/gif' || fileType === 'image/webp' || fileExt === 'gif' || fileExt === 'webp') { sendFunction = { 'url': 'sendAnimation', 'type': 'animation' }; - }else if (fileType === 'image/svg+xml' || fileType === 'image/x-icon') { + } else if (fileType === 'image/svg+xml' || fileType === 'image/x-icon') { sendFunction = { 'url': 'sendDocument', 'type': 'document' }; } @@ -554,4 +554,4 @@ async function tryRetry(err, context, uploadChannel, fullId, metadata, fileExt, } return createResponse(JSON.stringify(errMessages), { status: 500 }); -} \ No newline at end of file +}