oicq-icalingua-plus-plus 1.23.7 → 1.23.8
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/lib/message/chat.js +1 -1
- package/lib/message/parser.js +12 -2
- package/package.json +3 -3
package/lib/message/chat.js
CHANGED
|
@@ -133,7 +133,7 @@ async function sendJsonMsg(target, json, group, sign) {
|
|
|
133
133
|
const payload = await this.sendOidb("OidbSvc.0xb77_9", pb.encode(body));
|
|
134
134
|
const data = pb.decode(payload);
|
|
135
135
|
if (data[3] !== 0)
|
|
136
|
-
return { result: -1, emsg: data[4] };
|
|
136
|
+
return { result: -1, emsg: data[4].toString() };
|
|
137
137
|
return { result: 0 };
|
|
138
138
|
}
|
|
139
139
|
|
package/lib/message/parser.js
CHANGED
|
@@ -478,10 +478,11 @@ class Parser {
|
|
|
478
478
|
const msg = {
|
|
479
479
|
type: "reply",
|
|
480
480
|
data: {
|
|
481
|
-
id: ""
|
|
481
|
+
id: "",
|
|
482
|
+
text: ""
|
|
482
483
|
}
|
|
483
484
|
};
|
|
484
|
-
let seq = elem[1], user_id = elem[2];
|
|
485
|
+
let seq = elem[1], user_id = elem[2], replyed = Array.isArray(elem[5]) ? elem[5] : [elem[5]];
|
|
485
486
|
if (this.gid) {
|
|
486
487
|
let random = elem[8] ? genRandom(elem[8][3]) : null;
|
|
487
488
|
let time = elem[3];
|
|
@@ -497,6 +498,15 @@ class Parser {
|
|
|
497
498
|
let flag = user_id === this.c.uin ? 1 : 0;
|
|
498
499
|
msg.data.id = genC2CMessageId(this.uid, seq, random, time, flag);
|
|
499
500
|
}
|
|
501
|
+
for (let m of replyed) {
|
|
502
|
+
if (m[1]) {
|
|
503
|
+
msg.data.text += String(m[1][1]);
|
|
504
|
+
} else if (m[2] || m[6] || m[34]) {
|
|
505
|
+
msg.data.text += "[表情]";
|
|
506
|
+
} else if (m[4] || m[8]) {
|
|
507
|
+
msg.data.text += "[图片]";
|
|
508
|
+
}
|
|
509
|
+
}
|
|
500
510
|
this.message.unshift(msg);
|
|
501
511
|
this.raw_message = (this.c.config.brief ? "[回复]" : genCQMsg(msg)) + this.raw_message;
|
|
502
512
|
} catch { }
|
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/01/
|
|
4
|
+
"version": "1.23.8",
|
|
5
|
+
"app_version": "1.23.8",
|
|
6
|
+
"upday": "2023/01/15",
|
|
7
7
|
"protocol_version": "v11",
|
|
8
8
|
"description": "oicq(https://github.com/takayama-lily/oicq) v1 for Icalingua++",
|
|
9
9
|
"main": "index.js",
|