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 +8 -1
- package/lib/client.js +1 -1
- package/lib/oicq.js +1 -1
- package/lib/wtlogin/wt.js +5 -1
- package/package.json +3 -3
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:
|
|
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
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
|
|
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.
|
|
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.
|
|
5
|
-
"app_version": "1.23.
|
|
6
|
-
"upday": "2023/08/
|
|
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",
|