Merge branch 'dev'

# Conflicts:
#	manifest.json
#	src/version.ts
This commit is contained in:
linyuchen 2024-11-15 11:01:52 +08:00
commit 466a3e4d66
3 changed files with 5 additions and 5 deletions

View File

@ -4,7 +4,7 @@
"name": "LLOneBot",
"slug": "LLOneBot",
"description": "实现 OneBot 11 和 Satori 协议,用于 QQ 机器人开发",
"version": "4.2.1",
"version": "4.2.2",
"icon": "./icon.webp",
"authors": [
{

View File

@ -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)
}
},
})
}

View File

@ -1 +1 @@
export const version = '4.2.1'
export const version = '4.2.2'