From f79581d97e52a118e2f7c5ea80cf31d53014e9ad Mon Sep 17 00:00:00 2001 From: linyuchen Date: Fri, 15 Nov 2024 10:58:35 +0800 Subject: [PATCH 1/2] =?UTF-8?q?:bug:=E4=BF=AE=E5=A4=8D=20hook=20ipc=20?= =?UTF-8?q?=E6=97=B6=E8=8E=B7=E5=8F=96=E4=B8=8D=E5=88=B0=20callbackId=20?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E5=85=B6=E4=BB=96=E6=8F=92=E4=BB=B6=20ipc=20?= =?UTF-8?q?=E9=80=9A=E4=BF=A1=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ntqqapi/hook.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ntqqapi/hook.ts b/src/ntqqapi/hook.ts index eb36206..9443019 100644 --- a/src/ntqqapi/hook.ts +++ b/src/ntqqapi/hook.ts @@ -58,14 +58,14 @@ export function startHook() { event.sender[senderExclude] = true event.sender.send = new Proxy(event.sender.send, { apply(target, thisArg, args: [channel: string, meta: Dict, data: Dict[]]) { - if (args[1].eventName?.startsWith('ns-LoggerApi')) { + if (args[1]?.eventName?.startsWith('ns-LoggerApi')) { return target.apply(thisArg, args) } if (logHook) { log('received', args) } - const callbackId = args[1].callbackId + const callbackId = args[1]?.callbackId if (callbackId) { if (hookApiCallbacks[callbackId]) { Promise.resolve(hookApiCallbacks[callbackId](args[2])) @@ -97,7 +97,7 @@ export function startHook() { } } return target.apply(thisArg, args) - } + }, }) } From f6263375f193fbc77c5207676bacf1ca58fb94d1 Mon Sep 17 00:00:00 2001 From: linyuchen Date: Fri, 15 Nov 2024 11:01:25 +0800 Subject: [PATCH 2/2] chore: version 4.2.2 --- manifest.json | 2 +- src/version.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index db4ebe7..f7bc811 100644 --- a/manifest.json +++ b/manifest.json @@ -4,7 +4,7 @@ "name": "LLOneBot", "slug": "LLOneBot", "description": "实现 OneBot 11 和 Satori 协议,用于 QQ 机器人开发", - "version": "4.2.0", + "version": "4.2.2", "icon": "./icon.webp", "authors": [ { diff --git a/src/version.ts b/src/version.ts index e646a57..9c9f404 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const version = '4.2.0' +export const version = '4.2.2'