oicq-icalingua-plus-plus 1.24.3 → 1.24.4

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.
@@ -369,7 +369,7 @@ class Parser {
369
369
  case 46: //markdown button
370
370
  break;
371
371
  case 48: //ntv2richmedia
372
- const imgData = await this.parseNTImgElem(type, elem);
372
+ const imgData = await this.parseNTImgElem(type, elem[2], elem[3]);
373
373
  if (imgData) {
374
374
  msg.type = "image";
375
375
  msg.data = imgData;
@@ -467,7 +467,7 @@ class Parser {
467
467
  } else if (elem[1] === 20) { //json only for mobileqq
468
468
  await this.parseExclusiveElem(51, elem[2]);
469
469
  } else if (elem[1] == 48) { //ntv2richmedia
470
- await this.parsePartialElem(48, elem[2]);
470
+ await this.parsePartialElem(48, elem);
471
471
  if (elem[2] && elem[2][1] && elem[2][1][2] && elem[2][1][2][1] && elem[2][1][2][3])
472
472
  this.imgprefix = "https://" + String(elem[2][1][2][3]) + String(elem[2][1][2][1]);
473
473
  } else if (elem[1] == 45) { //markdown
@@ -492,12 +492,11 @@ class Parser {
492
492
  * @param {number} businessType
493
493
  */
494
494
  async parseNTImgElem(type, elem, businessType = 0) {
495
+ if (![0, 10, 20].includes(businessType)) return null;
495
496
  const data = { };
496
497
  if (!elem[2] || !elem[2][1]) return null;
497
- //const dm = businessType ? businessType === 10 : !!elem[2][1][11];
498
- const dm = !!elem[2][1][11];
499
- const extra = dm ? elem[2][1][11] : elem[2][1][12];
500
- if (!extra) return null;
498
+ const dm = businessType ? businessType === 10 : !!elem[2][1][11];
499
+ const extra = elem[2][1][11] || elem[2][1][12] || { 30: "" };
501
500
  const ntPath = String(extra[30] || "");
502
501
 
503
502
  const imgInfo = elem[1][1];
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.24.3",
5
- "app_version": "1.24.3",
6
- "upday": "2024/04/23",
4
+ "version": "1.24.4",
5
+ "app_version": "1.24.4",
6
+ "upday": "2024/04/24",
7
7
  "protocol_version": "v11",
8
8
  "description": "oicq(https://github.com/takayama-lily/oicq) v1 for Icalingua++",
9
9
  "main": "index.js",