oicq-icalingua-plus-plus 1.23.63 → 1.23.65

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/client-ext.js CHANGED
@@ -391,6 +391,7 @@ Client.prototype.registerQSign = async function(retry = 0) {
391
391
  };
392
392
 
393
393
  const unsendSso = [];
394
+ const signLock = new Set();
394
395
 
395
396
  /**
396
397
  * 发送qsign给的sso包
@@ -521,6 +522,7 @@ Client.prototype.refreshQSignToken = async function(retry = 0) {
521
522
  */
522
523
  Client.prototype.getSign = async function(cmd, body, retry = 0) {
523
524
  if (!this.config.sign_api_addr || !this.apk.qua) return BUF0;
525
+ const seq_id = this.seq_id;
524
526
  let signObj ={
525
527
  9: 1,
526
528
  12: this.device.qimei36 || this.device.qimei16 || this.device.android_id,
@@ -542,6 +544,10 @@ Client.prototype.getSign = async function(cmd, body, retry = 0) {
542
544
  url += '/';
543
545
  }
544
546
  url += 'sign';
547
+ while (signLock.size >= 3) {
548
+ await sleep(100);
549
+ }
550
+ signLock.add(seq_id);
545
551
  const { data } = await axios.post(url,
546
552
  {
547
553
  ver: this.apk.ver,
@@ -552,7 +558,7 @@ Client.prototype.getSign = async function(cmd, body, retry = 0) {
552
558
  uin: this.uin,
553
559
  buffer: body.toString('hex'),
554
560
  cmd: cmd,
555
- seq: this.seq_id,
561
+ seq: seq_id,
556
562
  qua: this.apk.qua,
557
563
  key: this.config.sign_api_key
558
564
  },
@@ -564,6 +570,7 @@ Client.prototype.getSign = async function(cmd, body, retry = 0) {
564
570
  }
565
571
  }
566
572
  ).catch((e) => ({ data: { code: -1, msg: e ? e.message : 'failed to connect to qsign api' } }));
573
+ signLock.delete(seq_id);
567
574
  if (data.code !== 0) {
568
575
  if (data.code === 1 && String(data.msg).includes('not registered')) {
569
576
  await this.registerQSign();
package/lib/client.js CHANGED
@@ -96,7 +96,7 @@ class Client extends EventEmitter {
96
96
  "OidbSvc.0x758",
97
97
  "OidbSvc.0x758_0",
98
98
  "OidbSvc.0x758_1",
99
- "OidbSvc.0x88d_0",
99
+ //"OidbSvc.0x88d_0",
100
100
  "OidbSvc.0x89a_0",
101
101
  "OidbSvc.0x89b_1",
102
102
  "OidbSvc.0x8a1_0",
package/lib/oicq.js CHANGED
@@ -234,7 +234,7 @@ Client.prototype._startHeartbeat = function () {
234
234
  }
235
235
  this._wt.syncTimeDiff();
236
236
  this._wt.heartbeat();
237
- if (timestamp() - this.sig.qsign_token_time >= (60 * 60 * 1000)) {
237
+ if (timestamp() - this.sig.qsign_token_time >= (60 * 60)) {
238
238
  this.sig.qsign_token_time = timestamp();
239
239
  this.refreshQSignToken();
240
240
  }
package/lib/wtlogin/wt.js CHANGED
@@ -449,7 +449,11 @@ class WtLogin {
449
449
  }
450
450
 
451
451
  deleteToken() {
452
- return fs.promises.unlink(path.join(this.dir, "token")).catch(NOOP);
452
+ return fs.promises.rename(
453
+ path.join(this.dir, "token"),
454
+ path.join(this.dir, "token." + Date.now())
455
+ ).catch(NOOP);
456
+ //return fs.promises.unlink(path.join(this.dir, "token")).catch(NOOP);
453
457
  }
454
458
 
455
459
  async exchangeEmp() {
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.63",
5
- "app_version": "1.23.63",
6
- "upday": "2023/08/18",
4
+ "version": "1.23.65",
5
+ "app_version": "1.23.65",
6
+ "upday": "2023/08/19",
7
7
  "protocol_version": "v11",
8
8
  "description": "oicq(https://github.com/takayama-lily/oicq) v1 for Icalingua++",
9
9
  "main": "index.js",