From 0eff8e064810548a68a70250d1796052194a76d0 Mon Sep 17 00:00:00 2001 From: 2y8e9h22 <70102795+2y8e9h22@users.noreply.github.com> Date: Thu, 9 Mar 2023 22:21:17 +0800 Subject: [PATCH] =?UTF-8?q?e=E8=87=AA=E5=AE=9A=E4=B9=89=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E9=A2=91=E9=81=93=20(#15)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/plugins/loader.js | 16 ++++++++++++++-- package.json | 3 --- patches/oicq@2.3.1.patch | 17 ----------------- 3 files changed, 14 insertions(+), 22 deletions(-) delete mode 100644 patches/oicq@2.3.1.patch diff --git a/lib/plugins/loader.js b/lib/plugins/loader.js index a5cd6a1..0fade53 100644 --- a/lib/plugins/loader.js +++ b/lib/plugins/loader.js @@ -343,6 +343,12 @@ class PluginsLoader { * @param e.isMaster 是否管理员 * @param e.logText 日志用户字符串 * @param e.logFnc 日志方法字符串 + + * 频道 + * @param e.isGuild 是否频道 + * @param e.at 支持频道 tiny_id + * @param e.atBot 支持频道 + */ dealMsg (e) { if (e.message) { @@ -366,9 +372,13 @@ class PluginsLoader { case 'at': if (val.qq == Bot.uin) { e.atBot = true + } else if (val.id == Bot.tiny_id) { + e.atBot = true + /** 多个at 以最后的为准 */ + } else if (val.id) { + e.at = val.id } else { - /** 多个at 以最后的为准 */ - e.at = val.qq + e.at = val.qq } break case 'file': @@ -418,6 +428,8 @@ class PluginsLoader { if (!e.group_name) e.group_name = e.group?.name e.logText = `[${e.group_name}(${e.sender.card})]` + } else if (e.detail_type === 'guild') { + e.isGuild = true } if (e.user_id && cfg.masterQQ.includes(Number(e.user_id))) { diff --git a/package.json b/package.json index e1ee8b4..022826f 100644 --- a/package.json +++ b/package.json @@ -49,8 +49,5 @@ "imports": { "#miao": "./plugins/miao-plugin/components/index.js", "#miao.models": "./plugins/miao-plugin/models/index.js" - }, - "pnpm": { - "patchedDependencies": {} } } \ No newline at end of file diff --git a/patches/oicq@2.3.1.patch b/patches/oicq@2.3.1.patch deleted file mode 100644 index 532af70..0000000 --- a/patches/oicq@2.3.1.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/lib/core/device.js b/lib/core/device.js -index ffadc63f15e8b0b435e640af60c6b854d0236a83..8a09faebae021f845d961086c8bb2b9ee19096f3 100644 ---- a/lib/core/device.js -+++ b/lib/core/device.js -@@ -105,9 +105,9 @@ var Platform; - })(Platform = exports.Platform || (exports.Platform = {})); - const mobile = { - id: "com.tencent.mobileqq", -- name: "A8.8.80.7400", -- version: "8.8.80.7400", -- ver: "8.8.80", -+ name: "A8.9.25.10005", -+ version: "A8.9.25.10005", -+ ver: "8.9.25", - sign: Buffer.from([166, 183, 69, 191, 36, 162, 194, 119, 82, 119, 22, 246, 243, 110, 182, 141]), - buildtime: 1640921786, - appid: 16, \ No newline at end of file