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 代码开发。** diff --git a/launcher/qqnt.json b/launcher/qqnt.json index 6d64e336..974f54b7 100644 --- a/launcher/qqnt.json +++ b/launcher/qqnt.json @@ -2,6 +2,8 @@ "name": "qq-chat", "version": "9.9.15-28418", "verHash": "512caf78", + "linuxVersion": "3.2.12-28327", + "linuxVerHash": "f60e8252", "type": "module", "private": true, "description": "QQ", 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[]) {