From 065adeb2cd5842905d31f9ecf227224e49e66bce 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: Fri, 6 Sep 2024 07:40:33 +0800 Subject: [PATCH 1/3] fix --- README.md | 10 +--------- src/onebot/cqcode.ts | 5 +---- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 3bad1890..dd8e2aea 100644 --- a/README.md +++ b/README.md @@ -38,12 +38,4 @@ NapCatQQ (aka 猫猫框架) 是现代化的基于 NTQQ 的 Bot 协议端实现 > [!CAUTION]\ > **请不要在 QQ 官方群聊和任何影响力较大的简中互联网平台(包括但不限于: 哔哩哔哩,微博,知乎,抖音等)发布和讨论*任何*与本项目存在相关性的信息** -任何使用本仓库代码的地方,都应当严格遵守[本仓库开源许可](./LICENSE)。**此外,禁止任何项目未经授权二次分发或基于 NapCat 代码开发。** - -## 挥别昨日 - -下列特性因过于陈旧或不再适用于现代化的 QQNT 特性,已经停止维护。已有的代码将会保留,但不会对新的 QQNT 特性进行适配,也不再接受新的 PR 或 Issue。 - -### CQCode - -[CQCode](https://github.com/botuniverse/onebot-11/blob/master/message/string.md) 原本是作为 CoolQ 的消息格式而设计的,它不支持嵌套消息,并且在解析上的实现没有统一标准。随着 QQNT 的发展,CQCode 已经逐渐被 array 消息格式所取代。因此,我们建议您尽快迁移至新的消息格式 array,以便更好地适配新的 QQNT 特性。 +任何使用本仓库代码的地方,都应当严格遵守[本仓库开源许可](./LICENSE)。**此外,禁止任何项目未经授权二次分发或基于 NapCat 代码开发。** \ No newline at end of file diff --git a/src/onebot/cqcode.ts b/src/onebot/cqcode.ts index b64b85fe..9c830166 100644 --- a/src/onebot/cqcode.ts +++ b/src/onebot/cqcode.ts @@ -66,10 +66,7 @@ export function encodeCQCode(data: OB11MessageData) { let result = '[CQ:' + data.type; for (const name in data.data) { - const value = - // eslint-disable-next-line - // @ts-ignore - data.data[name]; + const value = (data.data as any)[name]; if (value === undefined) { continue; } From 48b389ebe305d6b298c51f77b9b889d00fae1446 Mon Sep 17 00:00:00 2001 From: Drsanwujiang Date: Fri, 6 Sep 2024 11:02:41 +0800 Subject: [PATCH 2/3] Fix bug: active HTTP adapter --- src/onebot/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/onebot/index.ts b/src/onebot/index.ts index 4d9ec98c..ec40761e 100644 --- a/src/onebot/index.ts +++ b/src/onebot/index.ts @@ -98,7 +98,7 @@ export class NapCatOneBot11Adapter { if (ob11Config.http.enablePost) { ob11Config.http.postUrls.forEach(url => { this.networkManager.registerAdapter(new OB11ActiveHttpAdapter( - url, ob11Config.token, this.core, this, + url, ob11Config.http.secret, this.core, this, )); }); } @@ -168,7 +168,7 @@ export class NapCatOneBot11Adapter { if (now.http.enablePost) { now.http.postUrls.forEach(url => { this.networkManager.registerAdapterAndOpen(new OB11ActiveHttpAdapter( - url, now.token, this.core, this, + url, now.http.secret, this.core, this, )); }); } else { @@ -182,7 +182,7 @@ export class NapCatOneBot11Adapter { ); for (const url of added) { await this.networkManager.registerAdapterAndOpen(new OB11ActiveHttpAdapter( - url, now.token, this.core, this, + url, now.http.secret, this.core, this, )); } } From ac2b0118a60778ed7ed175b57f126971ba0617b2 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: Fri, 6 Sep 2024 12:13:22 +0800 Subject: [PATCH 3/3] release: 2.3.5 --- manifest.json | 2 +- package.json | 2 +- src/common/version.ts | 2 +- src/webui/ui/NapCat.ts | 2 +- static/assets/renderer.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/manifest.json b/manifest.json index 01efc295..8a0849dd 100644 --- a/manifest.json +++ b/manifest.json @@ -4,7 +4,7 @@ "name": "NapCatQQ", "slug": "NapCat.Framework", "description": "高性能的 OneBot 11 协议实现", - "version": "2.3.4", + "version": "2.3.5", "icon": "./logo.png", "authors": [ { diff --git a/package.json b/package.json index f0ffb29e..8c20adc1 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "napcat", "private": true, "type": "module", - "version": "2.3.4", + "version": "2.3.5", "scripts": { "build:framework": "vite build --mode framework", "build:shell": "vite build --mode shell", diff --git a/src/common/version.ts b/src/common/version.ts index 015b4261..d02f3606 100644 --- a/src/common/version.ts +++ b/src/common/version.ts @@ -1 +1 @@ -export const napCatVersion = '2.3.4'; +export const napCatVersion = '2.3.5'; diff --git a/src/webui/ui/NapCat.ts b/src/webui/ui/NapCat.ts index 40c6c3c7..e8c57f9d 100644 --- a/src/webui/ui/NapCat.ts +++ b/src/webui/ui/NapCat.ts @@ -30,7 +30,7 @@ async function onSettingWindowCreated(view: Element) { SettingItem( 'Napcat', undefined, - SettingButton('V2.3.4', 'napcat-update-button', 'secondary'), + SettingButton('V2.3.5', 'napcat-update-button', 'secondary'), ), ]), SettingList([ diff --git a/static/assets/renderer.js b/static/assets/renderer.js index 690449da..7693e3a4 100644 --- a/static/assets/renderer.js +++ b/static/assets/renderer.js @@ -164,7 +164,7 @@ async function onSettingWindowCreated(view) { SettingItem( 'Napcat', void 0, - SettingButton("V2.3.4", "napcat-update-button", "secondary") + SettingButton("V2.3.5", "napcat-update-button", "secondary") ) ]), SettingList([