oicq-icalingua-plus-plus 1.23.69 → 1.23.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +1 -0
- package/lib/message/parser.js +28 -0
- package/package.json +3 -3
package/index.d.ts
CHANGED
package/lib/message/parser.js
CHANGED
|
@@ -531,6 +531,34 @@ class Parser {
|
|
|
531
531
|
* @param {import("../ref").Proto} elem
|
|
532
532
|
*/
|
|
533
533
|
parseTransElem(elem) {
|
|
534
|
+
if (elem[7]) {
|
|
535
|
+
try {
|
|
536
|
+
const ext = JSON.parse(String(elem[7]));
|
|
537
|
+
if (ext.ExtInfo) { //转发消息里的文件
|
|
538
|
+
const f_file = pb.decode(Buffer.from(ext.ExtInfo,'base64'))[2];
|
|
539
|
+
const fid = String(f_file[4]);
|
|
540
|
+
if (f_file[14]) { //私聊型转发的文件
|
|
541
|
+
const fileid = f_file[4].toBuffer(),
|
|
542
|
+
md5 = f_file[8].toHex(),
|
|
543
|
+
name = String(f_file[5]),
|
|
544
|
+
size = f_file[6],
|
|
545
|
+
duration = f_file[9] || 0;
|
|
546
|
+
return new Promise((resolve, reject)=>{
|
|
547
|
+
getC2CFileUrl.call(this.c, fileid).then((url)=>{
|
|
548
|
+
resolve({
|
|
549
|
+
name, url, size, md5, duration,
|
|
550
|
+
busid: 0,
|
|
551
|
+
fileid: String(fileid)
|
|
552
|
+
})
|
|
553
|
+
})
|
|
554
|
+
})
|
|
555
|
+
}
|
|
556
|
+
const gid = f_file[3];
|
|
557
|
+
const gfs = new Gfs(this.c, gid);
|
|
558
|
+
return gfs.download(fid);
|
|
559
|
+
}
|
|
560
|
+
} catch { }
|
|
561
|
+
}
|
|
534
562
|
elem = pb.decode(elem[2].toBuffer().slice(3))[7][2];
|
|
535
563
|
const fid = String(elem[2]);
|
|
536
564
|
const gfs = new Gfs(this.c, this.gid);
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oicq-icalingua-plus-plus",
|
|
3
3
|
"app_name": "oicq-icalingua-plus-plus",
|
|
4
|
-
"version": "1.23.
|
|
5
|
-
"app_version": "1.23.
|
|
6
|
-
"upday": "2023/09/
|
|
4
|
+
"version": "1.23.71",
|
|
5
|
+
"app_version": "1.23.71",
|
|
6
|
+
"upday": "2023/09/10",
|
|
7
7
|
"protocol_version": "v11",
|
|
8
8
|
"description": "oicq(https://github.com/takayama-lily/oicq) v1 for Icalingua++",
|
|
9
9
|
"main": "index.js",
|