From 648faedca6401fe2841d8bcd78d3ea76ce0debdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Wed, 20 Nov 2024 10:16:41 +0800 Subject: [PATCH] fix: #544 --- src/core/apis/file.ts | 2 +- src/onebot/config/config.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/apis/file.ts b/src/core/apis/file.ts index fda52bd4..97f8c304 100644 --- a/src/core/apis/file.ts +++ b/src/core/apis/file.ts @@ -107,7 +107,7 @@ export class NTQQFileApi { }; } - async createValidSendPicElement(context: MessageContext, picPath: string, summary: string = '', subType: 0 | 1 = 0,): Promise { + async createValidSendPicElement(context: MessageContext, picPath: string, summary: string = '', subType: 0 | 1 = 0): Promise { const { md5, fileName, path, fileSize } = await this.core.apis.FileApi.uploadFile(picPath, ElementType.PIC, subType); if (fileSize === 0) { throw new Error('文件异常,大小为0'); diff --git a/src/onebot/config/config.ts b/src/onebot/config/config.ts index 00e6d55c..2a70dea0 100644 --- a/src/onebot/config/config.ts +++ b/src/onebot/config/config.ts @@ -149,6 +149,9 @@ export function mergeOneBotConfigs( if (userConfig.musicSignUrl !== undefined) { mergedConfig.musicSignUrl = userConfig.musicSignUrl; } + if(userConfig.enableLocalFile2Url !== undefined) { + mergedConfig.enableLocalFile2Url = userConfig.enableLocalFile2Url; + } return mergedConfig; }