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] 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 },