From 25253ad9e7e25709ac85aa35b6bf1b7e9e6801e1 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, 14 Aug 2024 01:22:08 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/onebot/helper/data.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/onebot/helper/data.ts b/src/onebot/helper/data.ts index 40596fe75..d563d7a1a 100644 --- a/src/onebot/helper/data.ts +++ b/src/onebot/helper/data.ts @@ -52,7 +52,7 @@ export class OB11Constructor { messagePostFormat: string = obcore.configLoader.configData.messagePostFormat ): Promise { if (msg.senderUin == "0" || msg.senderUin == "") return; - if (msg.peerUin == "0" || msg.peerUin) return; + if (msg.peerUin == "0" || msg.peerUin == "") return; //跳过空消息 const NTQQGroupApi = core.apis.GroupApi; const NTQQUserApi = core.apis.UserApi; From f0306cd10a3c2ededb4b41fa9eae45152300f48e Mon Sep 17 00:00:00 2001 From: Alen Date: Wed, 14 Aug 2024 01:32:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20GetCookie=E5=AE=B9=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改 API提交不可用域名或不含skey返回时的容错 --- src/onebot/action/user/GetCookies.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/onebot/action/user/GetCookies.ts b/src/onebot/action/user/GetCookies.ts index 621e8dac4..147b49dbf 100644 --- a/src/onebot/action/user/GetCookies.ts +++ b/src/onebot/action/user/GetCookies.ts @@ -67,7 +67,7 @@ export class GetCookies extends BaseAction { const cookiesObject = await NTQQUserApi.getCookies(payload.domain); //把获取到的cookiesObject转换成 k=v; 格式字符串拼接在一起 const cookies = Object.entries(cookiesObject).map(([key, value]) => `${key}=${value}`).join('; '); - const bkn = NTQQWebApi.getBknFromCookie(cookiesObject); + const bkn = cookiesObject?.skey ? NTQQWebApi.getBknFromCookie(cookiesObject) : ''; return { cookies, bkn }; } }