From f14726ed1aaa6ff4b97b1578c327943e438d65df 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: Thu, 29 Aug 2024 21:55:44 +0800 Subject: [PATCH 1/2] fix: getfile --- src/core/apis/file.ts | 3 --- src/onebot/config/onebot11.json | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/core/apis/file.ts b/src/core/apis/file.ts index 03118965..f1c9bac3 100644 --- a/src/core/apis/file.ts +++ b/src/core/apis/file.ts @@ -353,9 +353,6 @@ export class NTQQFileApi { chatType: chatType, peerUid: peerUid, }, [msgId]); - if (msg.msgList.length === 0) { - return fileTransNotifyInfo.filePath; - } const mixElement = msg.msgList.find((msg) => msg.msgId === msgId)?.elements.find((e) => e.elementId === elementId); const mixElementInner = mixElement?.videoElement ?? mixElement?.fileElement ?? mixElement?.pttElement ?? mixElement?.picElement; let realPath = mixElementInner?.filePath; diff --git a/src/onebot/config/onebot11.json b/src/onebot/config/onebot11.json index 8ee5a368..e6823634 100644 --- a/src/onebot/config/onebot11.json +++ b/src/onebot/config/onebot11.json @@ -1,6 +1,6 @@ { "http": { - "enable": false, + "enable": true, "host": "", "port": 3000, "secret": "", @@ -9,7 +9,7 @@ "postUrls": [] }, "ws": { - "enable": false, + "enable": true, "host": "", "port": 3001 }, From f097050b566fc5eab870408cab05f6a6ffd12830 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: Thu, 29 Aug 2024 21:57:05 +0800 Subject: [PATCH 2/2] =?UTF-8?q?chore:=20=E7=A7=BB=E9=99=A4=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/onebot/config/onebot11.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/onebot/config/onebot11.json b/src/onebot/config/onebot11.json index e6823634..8ee5a368 100644 --- a/src/onebot/config/onebot11.json +++ b/src/onebot/config/onebot11.json @@ -1,6 +1,6 @@ { "http": { - "enable": true, + "enable": false, "host": "", "port": 3000, "secret": "", @@ -9,7 +9,7 @@ "postUrls": [] }, "ws": { - "enable": true, + "enable": false, "host": "", "port": 3001 },