From e3616b484e32d6e722e095db44677f9ed114e749 Mon Sep 17 00:00:00 2001 From: Qiao <168271758+Zengfanqiang06@users.noreply.github.com> Date: Sat, 28 Sep 2024 13:05:03 +0800 Subject: [PATCH 1/3] Update README.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除句号让其更统一( --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 39799c36..8ab0412a 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ --- ## 欢迎回来 -NapCatQQ (aka 猫猫框架) 是现代化的基于 NTQQ 的 Bot 协议端实现。 +NapCatQQ (aka 猫猫框架) 是现代化的基于 NTQQ 的 Bot 协议端实现 ## 猫猫技能 - [x] **高性能**:1K+ 群聊数目、20 线程并行发送消息毫无压力 @@ -20,7 +20,7 @@ NapCatQQ (aka 猫猫框架) 是现代化的基于 NTQQ 的 Bot 协议端实现 可前往 [Release](https://github.com/NapNeko/NapCatQQ/releases/) 页面下载最新版本 -**首次使用**请务必前往[官方文档](https://napneko.github.io/)查看使用教程。 +**首次使用**请务必前往[官方文档](https://napneko.github.io/)查看使用教程 ## 回家旅途 [QQ Group](https://qm.qq.com/q/VfjAq5HIMS) @@ -40,4 +40,4 @@ NapCatQQ (aka 猫猫框架) 是现代化的基于 NTQQ 的 Bot 协议端实现 > [!CAUTION]\ > **请不要在 QQ 官方群聊和任何影响力较大的简中互联网平台(包括但不限于: 哔哩哔哩,微博,知乎,抖音等)发布和讨论*任何*与本项目存在相关性的信息** -任何使用本仓库代码的地方,都应当严格遵守[本仓库开源许可](./LICENSE)。**此外,禁止任何项目未经授权二次分发或基于 NapCat 代码开发。** \ No newline at end of file +任何使用本仓库代码的地方,都应当严格遵守[本仓库开源许可](./LICENSE)。**此外,禁止任何项目未经授权二次分发或基于 NapCat 代码开发。** From adca850075e5c4ffe8407d1e8def336f9ff5fc2c Mon Sep 17 00:00:00 2001 From: Alen Date: Sat, 28 Sep 2024 13:20:19 +0800 Subject: [PATCH 2/3] =?UTF-8?q?chore:=20=E5=A2=9E=E5=8A=A0linux=E7=9B=AE?= =?UTF-8?q?=E6=A0=87QQ=E7=89=88=E6=9C=AC=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- launcher/qqnt.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/launcher/qqnt.json b/launcher/qqnt.json index 08fca388..3b18a589 100644 --- a/launcher/qqnt.json +++ b/launcher/qqnt.json @@ -2,6 +2,8 @@ "name": "qq-chat", "version": "9.9.15-28327", "verHash": "512caf78", + "linuxVersion": "3.2.12-28327", + "linuxVerHash": "f60e8252", "type": "module", "private": true, "description": "QQ", From b93e7b7ed131785d1ac012d3847e748e01ad1704 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: Sat, 28 Sep 2024 20:16:47 +0800 Subject: [PATCH 3/3] feat: get pskey --- src/core/apis/user.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/core/apis/user.ts b/src/core/apis/user.ts index 8d0a4b56..f55b27c9 100644 --- a/src/core/apis/user.ts +++ b/src/core/apis/user.ts @@ -120,12 +120,20 @@ export class NTQQUserApi { return this.context.session.getProfileService().modifyDesktopMiniProfile(param); } - //需要异常处理 async getCookies(domain: string) { const ClientKeyData = await this.forceFetchClientKey(); const requestUrl = 'https://ssl.ptlogin2.qq.com/jump?ptlang=1033&clientuin=' + this.core.selfInfo.uin + '&clientkey=' + ClientKeyData.clientKey + '&u1=https%3A%2F%2F' + domain + '%2F' + this.core.selfInfo.uin + '%2Finfocenter&keyindex=19%27'; - return await RequestUtil.HttpsGetCookies(requestUrl); + let data = await RequestUtil.HttpsGetCookies(requestUrl); + if (!data.p_skey || data.p_skey.length == 0) { + try { + let pskey = (await this.getPSkey([domain])).domainPskeyMap.get(domain); + if (pskey) data.p_skey = pskey; + } catch { + return data; + } + } + return data; } async getPSkey(domainList: string[]) {