From e9415eb723cba395f46407924b88993cc9067322 Mon Sep 17 00:00:00 2001 From: Clansty Date: Mon, 12 Aug 2024 19:31:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=BD=AC=E5=8F=91=E5=A4=9A=E6=9D=A1?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E6=B2=A1=E6=9C=89=E5=8F=91=E9=80=81=E8=80=85?= =?UTF-8?q?=E5=90=8D=E5=AD=97=E5=92=8C=E5=A4=B4=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/package.json | 2 +- package.json | 4 +- ...@1.2.4.patch => @icqqjs__icqq@1.2.5.patch} | 32 ++++++++ pnpm-lock.yaml | 78 ++++++------------- 4 files changed, 59 insertions(+), 57 deletions(-) rename patches/{@icqqjs__icqq@1.2.4.patch => @icqqjs__icqq@1.2.5.patch} (62%) diff --git a/main/package.json b/main/package.json index e167e4b..bf7a698 100644 --- a/main/package.json +++ b/main/package.json @@ -33,7 +33,7 @@ "elysia": "^1.1.5", "esbuild": "^0.23.0", "eviltransform": "^0.2.2", - "file-type": "^19.4.0", + "file-type": "^19.3.0", "fluent-ffmpeg": "^2.1.3", "image-size": "^1.1.1", "lodash": "^4.17.21", diff --git a/package.json b/package.json index 1b7d139..b6ee5e9 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "pnpm": { "patchedDependencies": { "telegram@2.23.10": "patches/telegram@2.20.15.patch", - "@icqqjs/icqq@1.2.5": "patches/@icqqjs__icqq@1.2.4.patch" + "@icqqjs/icqq@1.2.5": "patches/@icqqjs__icqq@1.2.5.patch" } }, - "packageManager": "pnpm@9.4.0+sha512.f549b8a52c9d2b8536762f99c0722205efc5af913e77835dbccc3b0b0b2ca9e7dc8022b78062c17291c48e88749c70ce88eb5a74f1fa8c4bf5e18bb46c8bd83a" + "packageManager": "pnpm@9.6.0+sha512.38dc6fba8dba35b39340b9700112c2fe1e12f10b17134715a4aa98ccf7bb035e76fd981cf0bb384dfa98f8d6af5481c2bef2f4266a24bfa20c34eb7147ce0b5e" } diff --git a/patches/@icqqjs__icqq@1.2.4.patch b/patches/@icqqjs__icqq@1.2.5.patch similarity index 62% rename from patches/@icqqjs__icqq@1.2.4.patch rename to patches/@icqqjs__icqq@1.2.5.patch index 764cc28..b75110c 100644 --- a/patches/@icqqjs__icqq@1.2.4.patch +++ b/patches/@icqqjs__icqq@1.2.5.patch @@ -65,3 +65,35 @@ index 27a659a3290fadd990a1a980918515a6ded4978f..e1bbe1470f302c30e7adea92f433a6e3 this.elems.unshift({ 45: { 1: [source.seq], +diff --git a/lib/message/message.d.ts b/lib/message/message.d.ts +index c4bdd4cde3de14d515ea55364bf6c5ba315a8281..0e1ef5aa876d8e4913dc7d41756c617080dd9ced 100644 +--- a/lib/message/message.d.ts ++++ b/lib/message/message.d.ts +@@ -203,6 +203,7 @@ export declare class ForwardMessage implements Forwardable { + /** 消息内容 */ + message: MessageElem[]; + raw_message: string; ++ avatar?: string; + /** 反序列化一条转发消息 */ + static deserialize(serialized: Buffer): ForwardMessage; + constructor(proto: pb.Proto); +diff --git a/lib/message/message.js b/lib/message/message.js +index dcf0238de649da2c866b354a32884d0e8389ddd4..fee8ffe09e34aa3a3d7870a0d65bc793feeb29f8 100644 +--- a/lib/message/message.js ++++ b/lib/message/message.js +@@ -367,12 +367,13 @@ class ForwardMessage { + this.proto = proto; + this.proto = proto; + const head = proto[1]; +- this.time = head[6] || 0; ++ this.time = head[6] || proto[2]?.[6] || 0; + this.seq = head[5]; + this.user_id = head[1] || 0; +- this.nickname = head[14]?.toString() || head[9]?.[4]?.toString() || ""; ++ this.nickname = head[14]?.toString() || head[9]?.[4]?.toString() || head[8]?.[4]?.toString() || ""; + this.group_id = head[9]?.[1]; + this.parsed = (0, parser_1.parse)(proto[3][1]); ++ this.avatar = head[20]?.[5]?.toString() || proto[2]?.[15]?.[5]?.toString(); + this.message = this.parsed.message; + this.raw_message = this.parsed.brief; + (0, common_1.lock)(this, "proto"); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 70cfa74..9732a76 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,8 +6,8 @@ settings: patchedDependencies: '@icqqjs/icqq@1.2.5': - hash: jsrdxp7lqfim3sw4pye6lcsgfa - path: patches/@icqqjs__icqq@1.2.4.patch + hash: 7qywka3kux3y3rupypzdaqreia + path: patches/@icqqjs__icqq@1.2.5.patch telegram@2.23.10: hash: w55ltxmvkfjk6y73vgvsjq5y5a path: patches/telegram@2.20.15.patch @@ -27,7 +27,7 @@ importers: version: 0.6.4(elysia@1.1.5(@sinclair/typebox@0.33.4)(typescript@5.5.4)) '@icqqjs/icqq': specifier: 1.2.5 - version: 1.2.5(patch_hash=jsrdxp7lqfim3sw4pye6lcsgfa) + version: 1.2.5(patch_hash=7qywka3kux3y3rupypzdaqreia) '@prisma/client': specifier: 5.18.0 version: 5.18.0(prisma@5.18.0) @@ -42,7 +42,7 @@ importers: version: 5.18.0 quote-api: specifier: https://github.com/Clansty/quote-api/archive/014b21138afbbe0e12c91b00561414b1e851fc0f.tar.gz - version: https://github.com/Clansty/quote-api/archive/014b21138afbbe0e12c91b00561414b1e851fc0f.tar.gz(bufferutil@4.0.8)(utf-8-validate@6.0.4) + version: https://github.com/Clansty/quote-api/archive/014b21138afbbe0e12c91b00561414b1e851fc0f.tar.gz(bufferutil@4.0.8)(utf-8-validate@5.0.10) sharp: specifier: ^0.33.4 version: 0.33.4 @@ -111,8 +111,8 @@ importers: specifier: ^0.2.2 version: 0.2.2 file-type: - specifier: ^19.4.0 - version: 19.4.0 + specifier: ^19.3.0 + version: 19.3.0 fluent-ffmpeg: specifier: ^2.1.3 version: 2.1.3 @@ -127,7 +127,7 @@ importers: version: 6.9.1 node-napcat-ts: specifier: ^0.1.4 - version: 0.1.4(bufferutil@4.0.8)(utf-8-validate@6.0.4) + version: 0.1.4(bufferutil@4.0.8)(utf-8-validate@5.0.10) nodejs-base64: specifier: ^2.0.0 version: 2.0.0 @@ -1090,9 +1090,6 @@ packages: cpu: [x64] os: [win32] - '@sec-ant/readable-stream@0.4.1': - resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==} - '@sinclair/typebox@0.33.4': resolution: {integrity: sha512-IUMFWdOtTqJ5F/rCjy2f3InRS9i4EWaCAMRsXVpUUQVi8hVByz/ifOi41Qt0Law8lz01/6zTz67vT70sB1VZbw==} @@ -1786,8 +1783,8 @@ packages: resolution: {integrity: sha512-/yFHK0aGjFEgDJjEKP0pWCplsPFPhwyfwevf/pVxiN0tmE4L9LmwWxWukdJSHdoCli4VgQLehjJtwQBnqmsKcw==} engines: {node: '>=10'} - file-type@19.4.0: - resolution: {integrity: sha512-7N7Pu0UzVYV8YP6WXhN+kcvtp/P00eWKVo76nMAK+RasRO/ICzuJzjoG+aSLqbY6khDAFQuqsyImGaSdkm49Iw==} + file-type@19.3.0: + resolution: {integrity: sha512-mROwiKLZf/Kwa/2Rol+OOZQn1eyTkPB3ZTwC0ExY6OLFCbgxHYZvBm7xI77NvfZFMKBsmuXfmLJnD4eEftEhrA==} engines: {node: '>=18'} file-uri-to-path@1.0.0: @@ -1868,10 +1865,6 @@ packages: resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} engines: {node: '>= 0.4'} - get-stream@9.0.1: - resolution: {integrity: sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==} - engines: {node: '>=18'} - get-tsconfig@4.7.6: resolution: {integrity: sha512-ZAqrLlu18NbDdRaHq+AKXzAmqIUPswPWKUchfytdAjiRFnCe5ojG2bstg6mRiZabkKfCoL/e98pbBELIV/YCeA==} @@ -2041,10 +2034,6 @@ packages: is-potential-custom-element-name@1.0.1: resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} - is-stream@4.0.1: - resolution: {integrity: sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==} - engines: {node: '>=18'} - is-typedarray@1.0.0: resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==} @@ -2910,10 +2899,6 @@ packages: resolution: {integrity: sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==} engines: {node: '>=6.14.2'} - utf-8-validate@6.0.4: - resolution: {integrity: sha512-xu9GQDeFp+eZ6LnCywXN/zBancWvOpUMzgjLPSjy4BRHSmTelvn2E0DG0o1sTiw5hkCKBHo8rwSKncfRfv2EEQ==} - engines: {node: '>=6.14.2'} - utif2@4.1.0: resolution: {integrity: sha512-+oknB9FHrJ7oW7A2WZYajOcv4FcDR4CfoGB0dPNfxbi4GO05RRnFmt5oa23+9w32EanrYcSJWspUiJkLMs+37w==} @@ -3520,7 +3505,7 @@ snapshots: '@hapi/bourne@3.0.0': {} - '@icqqjs/icqq@1.2.5(patch_hash=jsrdxp7lqfim3sw4pye6lcsgfa)': + '@icqqjs/icqq@1.2.5(patch_hash=7qywka3kux3y3rupypzdaqreia)': dependencies: axios: 1.7.3 log4js: 6.9.1 @@ -3963,8 +3948,6 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.18.1': optional: true - '@sec-ant/readable-stream@0.4.1': {} - '@sinclair/typebox@0.33.4': {} '@tokenizer/token@0.3.0': {} @@ -4721,9 +4704,8 @@ snapshots: strtok3: 6.3.0 token-types: 4.2.1 - file-type@19.4.0: + file-type@19.3.0: dependencies: - get-stream: 9.0.1 strtok3: 8.0.5 token-types: 6.0.0 uint8array-extras: 1.4.0 @@ -4805,11 +4787,6 @@ snapshots: has-symbols: 1.0.3 hasown: 2.0.2 - get-stream@9.0.1: - dependencies: - '@sec-ant/readable-stream': 0.4.1 - is-stream: 4.0.1 - get-tsconfig@4.7.6: dependencies: resolve-pkg-maps: 1.0.0 @@ -4985,8 +4962,6 @@ snapshots: is-potential-custom-element-name@1.0.1: {} - is-stream@4.0.1: {} - is-typedarray@1.0.0: {} isarray@0.0.1: {} @@ -5021,7 +4996,7 @@ snapshots: jsbn@1.1.0: {} - jsdom@16.7.0(bufferutil@4.0.8)(canvas@2.11.2)(utf-8-validate@6.0.4): + jsdom@16.7.0(bufferutil@4.0.8)(canvas@2.11.2)(utf-8-validate@5.0.10): dependencies: abab: 2.0.6 acorn: 8.12.0 @@ -5048,7 +5023,7 @@ snapshots: whatwg-encoding: 1.0.5 whatwg-mimetype: 2.3.0 whatwg-url: 8.7.0 - ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@6.0.4) + ws: 7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10) xml-name-validator: 3.0.0 optionalDependencies: canvas: 2.11.2 @@ -5176,10 +5151,10 @@ snapshots: long@5.2.3: {} - lottie-node@2.0.0(canvas@2.11.2)(jsdom@16.7.0(bufferutil@4.0.8)(canvas@2.11.2)(utf-8-validate@6.0.4))(lottie-web@5.12.2): + lottie-node@2.0.0(canvas@2.11.2)(jsdom@16.7.0(bufferutil@4.0.8)(canvas@2.11.2)(utf-8-validate@5.0.10))(lottie-web@5.12.2): dependencies: canvas: 2.11.2 - jsdom: 16.7.0(bufferutil@4.0.8)(canvas@2.11.2)(utf-8-validate@6.0.4) + jsdom: 16.7.0(bufferutil@4.0.8)(canvas@2.11.2)(utf-8-validate@5.0.10) lottie-web: 5.12.2 lottie-web@5.12.2: {} @@ -5319,9 +5294,9 @@ snapshots: dependencies: write-file-atomic: 1.3.4 - node-napcat-ts@0.1.4(bufferutil@4.0.8)(utf-8-validate@6.0.4): + node-napcat-ts@0.1.4(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: - ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4) + ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil - utf-8-validate @@ -5478,20 +5453,20 @@ snapshots: dependencies: inherits: 2.0.4 - quote-api@https://github.com/Clansty/quote-api/archive/014b21138afbbe0e12c91b00561414b1e851fc0f.tar.gz(bufferutil@4.0.8)(utf-8-validate@6.0.4): + quote-api@https://github.com/Clansty/quote-api/archive/014b21138afbbe0e12c91b00561414b1e851fc0f.tar.gz(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: canvas: 2.11.2 dotenv: 7.0.0 emoji-db: 14.0.1 jimp: 0.22.12 - jsdom: 16.7.0(bufferutil@4.0.8)(canvas@2.11.2)(utf-8-validate@6.0.4) + jsdom: 16.7.0(bufferutil@4.0.8)(canvas@2.11.2)(utf-8-validate@5.0.10) koa: 2.15.3 koa-bodyparser: 4.4.1 koa-logger: 3.2.1 koa-ratelimit: 4.3.0 koa-response-time: 2.1.0 koa-router: 7.4.0 - lottie-node: 2.0.0(canvas@2.11.2)(jsdom@16.7.0(bufferutil@4.0.8)(canvas@2.11.2)(utf-8-validate@6.0.4))(lottie-web@5.12.2) + lottie-node: 2.0.0(canvas@2.11.2)(jsdom@16.7.0(bufferutil@4.0.8)(canvas@2.11.2)(utf-8-validate@5.0.10))(lottie-web@5.12.2) lottie-web: 5.12.2 lru-cache: 5.1.1 object-sizeof: 1.6.3 @@ -5947,11 +5922,6 @@ snapshots: dependencies: node-gyp-build: 4.8.1 - utf-8-validate@6.0.4: - dependencies: - node-gyp-build: 4.8.1 - optional: true - utif2@4.1.0: dependencies: pako: 1.0.11 @@ -6084,15 +6054,15 @@ snapshots: imurmurhash: 0.1.4 slide: 1.1.6 - ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@6.0.4): + ws@7.5.10(bufferutil@4.0.8)(utf-8-validate@5.0.10): optionalDependencies: bufferutil: 4.0.8 - utf-8-validate: 6.0.4 + utf-8-validate: 5.0.10 - ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.4): + ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10): optionalDependencies: bufferutil: 4.0.8 - utf-8-validate: 6.0.4 + utf-8-validate: 5.0.10 xhr@2.6.0: dependencies: