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 +}